Rails 3 loading all models on startup
Posted
by janechii
on Stack Overflow
See other posts from Stack Overflow
or by janechii
Published on 2010-06-12T03:05:16Z
Indexed on
2010/06/12
3:12 UTC
Read the original article
Hit count: 179
ruby-on-rails
Hi all,
I have a class method mixed in to all my models. the method gets called when the model class is evaluated. unfortunately (for me), this seems to be on-demand, whenever the model is needed in development env. how can have rails load all the models at start up? is this even advisable?
class Foo < ActiveRecord::Base
include Acl
register_acl # i need this to be called for all models at start up
end
thank you!
© Stack Overflow or respective owner