Skip to content

Commit

Permalink
Fix icons not displayed in ActiveAdmin (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
claramaffei authored Jan 20, 2025
1 parent 2942cac commit 70d21b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/assets/stylesheets/active_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
//
// For example, to change the sidebar width:
// $sidebar-width: 242px;
$fa-font-path: ".";

// Active Admin's got SASS!
@import 'arctic_admin/src/scss/main';
@import '@fortawesome/fontawesome-free/css/all.css';
@import '@fortawesome/fontawesome-free/scss/fontawesome.scss';
@import '@fortawesome/fontawesome-free/scss/solid.scss';

// Overriding any non-variable Sass must be done after the fact.
// For example, to change the default status-tag color:
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
# Rails.application.config.assets.paths << Emoji.images_path
# Add Yarn node_modules folder to the asset load path.
Rails.application.config.assets.paths << Rails.root.join('node_modules')
Rails.application.config.assets.paths << Rails.root.join('node_modules/@fortawesome/fontawesome-free/webfonts')

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails.application.config.assets.precompile += %w[active_admin.js active_admin.css]
Rails.application.config.assets.precompile += %w[active_admin.js active_admin.css *.ttf *.woff2]

0 comments on commit 70d21b8

Please sign in to comment.