> The short version is, in development mode don't try to do anything
> which relies on classes hanging around, because they don't.


One of the things I need to do is dynamically defining table_prefix,
based class location. Models loaded from inside the gem will have a
specific prefix and the ones outside them gem will have another.

Something this would work, loading and unloading on every request.
Dir[File.join("#{Rails.root}/app/models", '*.rb')].each { |f| require
f }

But it would add a huge overhead to the load time on development.
Is there a model load hook or something like that ?


Regards,
Everton Moreth

-- 
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.

Reply via email to