Created
September 25, 2011 23:03
-
-
Save pirelenito/1241294 to your computer and use it in GitHub Desktop.
Fast mongoid single collection inheritance with Rails 3.1 Asset Pipeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Allows Mongoid's single collection inheritance to work with the Asset pipeline | |
| # without enabling model preloading, which greatly reduces the performance of | |
| # the application in development mode. | |
| # see: http://martinciu.com/2011/06/rails-3-1-and-slow-asset-pipeline.html | |
| # see: http://groups.google.com/group/mongoid/browse_thread/thread/3d37977a321dc56d?pli=1 | |
| # see: http://mongoid.org/docs/rails/railties.html | |
| config.to_prepare do | |
| Dir["#{Rails.root}/app/models/*.rb"].each {|file| require file } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment