2

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?

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Ah that's right I forgot about the initializer folder. Thank you.
No problem. There are many ways to do the same thing in rails.
When i use this with the CSS, all the original AA CSS gets lost. any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.