Extending association options


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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs