Probably the simplest way, given a my_app/vendor/plugins/my_plugin/app/
models/thing.rb, is to create the file my_app/app/models/thing.rb:
require File.join(RAILS_ROOT, 'vendor/plugins/my_plugin/app/models/
thing.rb')
class Thing < ActiveRecord::Base
def override_something
end
end
This is basically an equivalent of what the code-mixing was doing
anyway.
James
On 4 Mar 2009, at 02:58, Andrew Roth wrote:
Hi all,
I was reading James' summary of engines in rails 2.3 (http://rails-engines.org/news/2009/02/02/engines-in-rails-2-3/
) and at the bottom there is
"While the code mixing mechanism is quite neat, there are other ways
of overriding the implementation of methods which are more typically
Rubyish, and involve less magic. I’ll try and post some examples
here soon."
I'm wondering what those more Rubyish ways are. I rely on mixins in
a few of my apps, so I'm eager to learn.
thanks,
-Andrew Roth
_______________________________________________
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