Forum: Ruby on Rails Extending association options

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.
Jake J. (Guest)
on 2006-01-03 06:18

I see that the trunk of Rails is moving with 'reflections' for the
associations stuff.  I would like to plug into some of this development
with an 'acts' module and am wondering where best to find docs on it.

Say, for example, I'd like to add an option to belongs_to:

  belongs_to  :account, :new_option => 'name'

Where I have added "new_option" to the options on belongs_to.  Can this
be done easily within a module of some sort?

My module will then look for "belongs_to" associations for a model and
possibly look for this :new_option to override a default.

This topic is locked and can not be replied to.