On Tue, Oct 09, 2007 at 10:16:00AM -0400, Sean Schofield wrote: > Weird. I decided to test the default behavior before trying your > suggestion and it worked the opposite of how its been documented. My > app/models/Tag.rb loaded in place of plugin/models/Tag.rb.
That's correct, and as far as I know that's exactly how it's documented. It will load that model _instead_ of the one in your engine, as opposed to _mixing it in_ with the engine code, which is what happens with the controllers and helpers. This means that any methods defined on the model class in your engine will not be available from the application. That's why you need to manually add a require_dependency call just before defining your model. That way, the model class definition "opens up" the existing class from your engine. This is what happens automatically in the case of Controllers or Helpers. Hope this explanation is a little clearer, Peter Bex Solide ICT - http://www.solide-ict.nl _______________________________________________ Engine-Users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
