On May 27, 8:10 pm, snacktime
<snackt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> So is there a complete example anywhere of the best way to make
> plugins reloadable? Specifically we have a number of models in our
> plugins that need to be reloaded on each request in development. I do
> not want to use generators.
>
I just remove the plugin''s lib folder from
Dependencies.load_once_paths (in the plugin''s init.rb)
Fred> I''ve seen references to using config.to_prepare like this:
>
> config.to_prepare { require_dependency ''foo'' }
>
> What I don''t know is how to use this when we have 10 different
> plugins, each with 3-4 models. Do I have to hardcode all those models
> in custom code that I load in /lib, or is there a way to access config
> from a plugin''s init.rb?
>
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---