Model belongs_to eiher/or more than one models
问题 Is it possible to have a model which belongs_to (either/or) more than one models? For example, in my project I have a subscription model that may belong to a person or a group. When a person will join a particular group she automatically "inherits" the subscriptions of that group. I have set up the following associations In person.rb: has_many :subscriptions In group.rb: has_many :subscriptions In subscription.rb: belongs_to :person belongs_to :group Also, I have added fields for person_id