Forum: Ruby on Rails Extending association options

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E51c6ae07e72cf04ef869868cb8eca6e?d=identicon&s=25 Jake Janovetz (Guest)
on 2006-01-03 05:18
Hello-

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.

   Cheers,
   Jake
This topic is locked and can not be replied to.