Skip to content

Commit 70d21b8

Browse files
authored
Fix icons not displayed in ActiveAdmin (#959)
1 parent 2942cac commit 70d21b8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/assets/stylesheets/active_admin.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
//
77
// For example, to change the sidebar width:
88
// $sidebar-width: 242px;
9+
$fa-font-path: ".";
910

1011
// Active Admin's got SASS!
1112
@import 'arctic_admin/src/scss/main';
12-
@import '@fortawesome/fontawesome-free/css/all.css';
13+
@import '@fortawesome/fontawesome-free/scss/fontawesome.scss';
14+
@import '@fortawesome/fontawesome-free/scss/solid.scss';
1315

1416
// Overriding any non-variable Sass must be done after the fact.
1517
// For example, to change the default status-tag color:

config/initializers/assets.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
# Rails.application.config.assets.paths << Emoji.images_path
1010
# Add Yarn node_modules folder to the asset load path.
1111
Rails.application.config.assets.paths << Rails.root.join('node_modules')
12+
Rails.application.config.assets.paths << Rails.root.join('node_modules/@fortawesome/fontawesome-free/webfonts')
1213

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

0 commit comments

Comments
 (0)