Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add favicon to ActiveAdmin in rails 3

How can I add a favicon in Active Admin. I am using rails 3.2 and active admin 0.4.3

like image 396
Amal Kumar S Avatar asked Dec 08 '25 18:12

Amal Kumar S


2 Answers

Though this question is about an older version of ActiveAdmin, as of this commit ActiveAdmin supports favicons in the initializer. Around line 145 of active_admin.rb for me:

  # == Setting a Favicon
  #
  # config.favicon = '/assets/favicon.ico'

HTH the next person who comes along. I almost did the top-voted answer...

like image 189
maxbeizer Avatar answered Dec 12 '25 08:12

maxbeizer


Until they support favicon you can do the trick:

$(document).ready(function(){

  $('head').append("<link href='favicon.ico' rel='shortcut icon'>");

});
like image 31
kikorb Avatar answered Dec 12 '25 08:12

kikorb



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!