sferik/rails_admin — pull request #1135 by adrianmacneil (2012-05-16 02:10:28+00:00)
Title: Assets aren't precompiled with initialize_on_precompile=false

Currently, if you set config.assets.initialize_on_precompile = false in application.rb (e.g. when deploying to Heroku), the rails_admin.css and js files don't get precompiled.

The workaround is to add them into config.assets.precompile manually, but this is messy and duplicating code.

This fix adds :group => :assets to the initializer in engine.rb, which evidently tells Rails to run it even if the application was not initialized. This was mentioned in the Rails 3.1.1 release notes:

"Plugins developers need to special case their initializers that are meant to be run in the assets group by adding :group => :assets. [José Valim]"
http://weblog.rubyonrails.org/2011/10/7/ann-rails-3-1-1/

Long story short, it means everything will work nicely if you set config.assets.initialize_on_precompile = false, without any extra configuration needed :)