hzamani / acts_as_relation

Multi table Inheritance for rails
http://hzamani.github.com/acts_as_relation/
MIT License
180 stars 58 forks source link

Association Delegation #4

Closed dgalarza closed 13 years ago

dgalarza commented 13 years ago

Currently associations on parent models such as belongs_to are not being delegated back to the parent model.

This update checks for any belongs_to associations defined on the parent model and creates delegate methods for them. Only the belongs_to association has been updated since I could not think of an applicable case where has_many or has_one may wish to be delegated but the update could be easily modified to include them as well if desired.