Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add font awesome icons in active admin menu

I want to add font awesome icons to my active admin menus.

Please somebody help!

How can I add font awesome icons? I tried lots but didn't find the solution.

I am using active_admin_flat_skin.

enter image description here

like image 924
Sudeep Ghimiray Avatar asked Oct 26 '25 07:10

Sudeep Ghimiray


1 Answers

I think you need to try the following

# config/initializers/active_admin.rb
config.namespace :admin do |admin|
  admin.build_menu do |menu|
    menu.add :label => "<i class='fa fa-tachometer'></i> Dashboard".html_safe, :priority => 1
    menu.add :label => "Second Item", :priority => 2
    menu.add :label => "Third Item", :priority => 3
  end
end

If the font-awesome library imported then the try upper code.

It should work perfectly.

Hope it helps

like image 107
fool-dev Avatar answered Oct 28 '25 21:10

fool-dev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!