Forum: Ruby on Rails Extending model in plugin from another plugin

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
02ce816495146fe92431bf22256e9ae8?d=identicon&s=25 felix (Guest)
on 2007-04-26 20:08
(Received via mailing list)
I have written one plugin which defines some models.
I have a number of other plugins that depend on the first plugin
I would like to have the later plugins extend the model in the first
by adding 'has_many' associations to it.

I have tried like this:

module ActiveRecord
  class Base
    class FirstModel
      has_many :second_models

and various other variants but I can't seem to be able to call the
'has_man' method on a model that is already defined. Is there a simple
way to achieve this? It seems like there should be.

Any suggestions would be appreciated.

This topic is locked and can not be replied to.