LearningRoR
LearningRoR

Reputation: 27242

ActiveAdmin: changing css file?

I'm confused on where to put my new css file for ActiveAdmin to use. I have a folder called public/admin/active_admin.css and here https://github.com/gregbell/active_admin/issues/261, it says to put it in active_admin.rb but this doesn't exist in my application. Where does it go?

Upvotes: 2

Views: 1920

Answers (1)

CodeJoust
CodeJoust

Reputation: 3810

All you need to add is

# active_admin.rb
config.register_stylesheet 'active_admin_custom.css'

in the file config/application.rb (or an environment-specific config file) then the file /public/stylesheets/active_admin_custom.css

or you can create a new file:

config/initializers/active_admin.rb and put that line of code in there.

Upvotes: 4

Related Questions