With models (and other library code), the Engines plugin will only
load the first file for a given name that it finds. So, if you have an
engine with a ‘Blah’ model, and a second engine which has a newer
‘Blah’ model that you want to inherit from the first engine, you’re
going to need to use namespaces to distinguish between those models.
However, if you have
class Model1 < ActiveRecord::Base; end
class Model2 < Model1
… then that should work (you’ll need to set up your DB table to
deal with STI though).
If you’re trying to add methods to an existing model, rather than
subclass it, that’s where the current wrinkles are with the engine
model loading process. I’ve recommended that engine developers provide
their model classes as ‘stubs’ with most of the functionality in
models for this reason (see the login/user engines for examples of
The above said, I’m not 100% familiar with how ActiveRBAC is built, so
you might want to get in touch with those guys directly.
On 3/20/06, Brett W. email@example.com wrote:
For the interested, I’m extending the User model in active_rbac to
engine-developers mailing list