On 04/09/2011, at 9:42 AM, Tim Uckun wrote:

>> 
>> * Also, with that custom superclass, you can include the helpers you want 
>> there, and they'll be loaded for every controller subclassing from it.
> 
> I wanted to avoid creating superclasses (or even modules that you'd
> have to load into your classes). Your email gives me one idea though.
> I could add my code to the ActionController::Base. Although I am not
> crazy about that idea I think it might work. I'll have to decide what
> I find less objectionable :)

Sometimes a simple include is better for long-term maintainability than 
automatically (and invisibly) injecting into a superclass.

>> * Don't manually require anything that a Rails app would normally load 
>> itself (especially anything in app/models, app/controllers and app/helpers). 
>> That goes for the models, controllers and helpers in your engine as well as 
>> what's in the Rails app.
> 
> I need to figure out what is going on with the gemfile and requires.
> Nothing in the engine gemfile is loading up automatically and neither
> are the dependencies specified in the engine.

Are you adding the autoload paths in your Engine subclass? e.g.:

  class Xebec::Engine < Rails::Engine
    paths['app/controllers'] << 'app/controllers'
    paths['app/views']       << 'app/views'
  end

-- 
Pat

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" 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/rails-oceania?hl=en.

Reply via email to