Hi Hugo,

Are you using the engines 1.2 release? If so, check the UPGRADING file....

- James

On 2/22/07, Hugo Levasseur <[EMAIL PROTECTED]> wrote:
> Hey James,
>
> Thanks for the tips.
>
> Actually my problem was resolved using a combination of alias_method_chain
> and config.plugin = [ "engine", "*"].
>
> I ran into another small problem ...
>
> Trying to use another application that I built as a plugin, I found that the
> stylesheets don't get loaded.
>
> I tried to invoke them using <%= "engine_stylesheet 'stylesheet' %> but that
> returns an error saying that engine_stylesheet is undefined...
>
> Any clues?
>
> Thanks
>
> Hugo
>
>
> On 2/21/07, James Adam <[EMAIL PROTECTED]> wrote:
> > Hi Hugo,
> >
> > Using alias_method_chain is normally quite easy, but if you're doing
> > it from within a module you need to be sure that the
> > "alias_method_chain" call is made on the base class when it's included
> > - see the top of
> >
> engines/lib/engines/rails_extensions/rails_initializer.rb
> for an
> > example - I'm using base.class_eval to make the calls to
> > alias_method_chain as if they were in the including class itself.
> >
> > My guess is that it's something like this which is stopping your
> > methods being called - have a play around and if you're still not
> > making any progress, email us the code and we'll take a look.
> >
> > Cheers and thanks for the nice comments :)
> >
> > James
> >
> > On 2/20/07, Hugo Levasseur <[EMAIL PROTECTED] > wrote:
> > > Hi guys,
> > >
> > > I am a member of Steve's team (he posted last month about the 1.2
> branch).
> > >
> > > 1st Thanks for the amazing work to James!  Engines is an amazing piece
> of
> > > work.
> > >
> > > To the question then:
> > >
> > > I would need to be able to override a Rails Initializer method
> > > (find_plugins).
> > > I noticed that the rails_initializer.rb file contains the
> > > Engine::RailsExtensions::RailsInitializer which,
> according
> > > to its leading comment, attempts to override 3 Initializer methods.
> > >
> > > I therefore tried to put my "modified" version of find_plugins using the
> > > conventions found in the
> > > Engine::RailsExtensions::RailsInitializer:
> > >
> > > 1. using 'alias_method chain' : find_plugins, :engine_additions
> > >
> > > 2. writing a method called
> > > 'find_plugins_with_engine_additions' with a slightly
> > > modified body.
> > >
> > >
> > > The problem is that it doesn't seem to be invoked at any time (neither
> does
> > > the 'load_plugin_with_engine_addition).
> > >
> > > Could you let me know how and where it should be invoked / included to
> > > overwrite this Initializer method
> > >
> > > Thanks!
> > > _______________________________________________
> > > engine-developers mailing list
> > > [email protected]
> > >
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
> > >
> > >
> >
> >
> > --
> > * J *
> >   ~
> > _______________________________________________
> > engine-developers mailing list
> > [email protected]
> >
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
> >
>
>
> _______________________________________________
> engine-developers mailing list
> [email protected]
> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
>
>


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

Reply via email to