Ah,

Sorry - I think I misunderstood what you were trying to achieve. In
general, there's no simple way to set the options for a plugin before
it has loaded. If you need a plugin to have some options set and
*then* do something, init.rb probably isn't the place to achieve this.
Instead, I'd develop your plugin such that things can happen at the
end of environment.rb:

  MyPlugin.option_one = :something
  MyPlugin.option_two = [1,2,3,4]
  MyPlugin.ok_now_get_ready()

It sounds like you're trying to do something with the public asset
copying facilities; in this case, you *should* be able to re-set the
Engines.public_directory parameter at the bottom of environment.rb
file, and then call
Rails.plugins[:your_plugin_name].mirror_plugin_assets. That might do
what you hope.

What is it that you're specifically trying to do?



On 8/27/07, Bart Duchesne <[EMAIL PROTECTED]> wrote:
> James Adam wrote:
> > I believe you'll want to put it in the config.after_initialize block, 
> > somehow.
> >
> That doesn't seem to do the trick; the engine plugin is loaded and
> init'ed before after_initialize. So the files are copied to the
> public_directory specified in the Engines module itself and not to my
> specified directory setting.
>
> regards,
>
> Bart
>
> > On 8/24/07, Bart Duchesne <[EMAIL PROTECTED]> wrote:
> >
> >> Hi,
> >>
> >> Maybe I'm overseeing something, what is the right place to put
> >> Engines.<configparameter> (eg public paths) so that it is correctly used
> >> ? (or more generally MyPlugin.config; so that init.rb of my plugin
> >> behaves differently on startup if I'm running in dev mode or prod mode )
> >>
> >> If I put in environment.rb before the initializer it says Engines
> >> constant is missing (because plugins are not loaded yet)
> >>
> >> If I put it after the initializer block it's too late ...
> >>
> >> regards,
> >>
> >>
> >> Bart
> >> --
> >> NEW on aXs GUARD: SSL VPN !! (contact your reseller for more info)
> >>
> >> ---------------------------------------------------
> >> aXs GUARD has completed security and anti-virus checks on this e-mail 
> >> (http://www.axsguard.com)
> >> ---------------------------------------------------
> >> Able NV: ond.nr 0457.938.087
> >> RPR Mechelen
> >>
> >> _______________________________________________
> >> Engine-Users mailing list
> >> [email protected]
> >> http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
> >>
> >>
> >
> >
> >
>
> _______________________________________________
> Engine-Users mailing list
> [email protected]
> http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
>


-- 
* J *
  ~
_______________________________________________
Engine-Users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to