> I cant figure out how to eager load this. I could make it load all > models all the time, but is a great overhead, since Ill be dealing > with lots of models in the future. > > Can anyone help me with that ??
Models in development mode are lazily loaded and then unloaded after a request is processed, if you wanted to eagerly load a particular model just reference it in the to_prepare block. However, that will probably lead to strange behaviour where your classes no longer get reloaded. The short version is, in development mode don't try to do anything which relies on classes hanging around, because they don't. -- Cheers Koz -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
