That makes complete sense.  I ask because I end up sticking in the same 
code into application.rb for many apps I build (as well as other 
places). So I'm creating a custom 'general' engine for my apps for the 
obvious reasons.

One of these functions is a custom error intercept that emails us with 
details of the exception.  Another is a google-prefetching thwarter. 
Both need to be in application.rb to work.

After some more digging around, I realized that the include line that 
engines require in the application.rb and application_helper.rb load the 
default module in the engines' /lib directory.  So I'll just stick the 
methods in there.  (Right?)

P.S.  Engines have been a lifesaver for me so far.  Thanks to the 
developers for all of the hard work.

James Adam wrote:
> The short answer - this is expected behaviour.
> 
> While that might seem intuitively that it should work, the engines
> plugin won't support that type of behaviour - essentially because
> there's nothing the name 'application' (which is what gets passed to
> require_or_load) to indicate that this is a controller file, rather
> than a library or a model - from the name alone, it could be any ruby
> file.
> 
> The file 'application_helper' works because the Engines mechanism can
> determine that it is a helper automatically, and do the code mixing
> you might expect.
> 
> - james
> 
> On 3/21/06, Lance Ditkins <[EMAIL PROTECTED]> wrote:
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> engine-developers mailing list
>> [email protected]
>> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
>>
> 
> 
> --
> * J *
>   ~


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
engine-developers mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org

Reply via email to