So I have an Attribute model with lists the attributes of an object.
The attributes can be of different types so I have derived classes as
well, in this case I have a derived SubjectiveAttribute. The problem
I'm having revolves around my User model. A user is allowed to give
each attribute a weighting (which tells the system how important an
attribute is to a user). So, there's a Weight model and then Attribute
has the associations has_many :weights and has_many :users, :through
=> :weights. The problem is that SubjectiveAttribute is related to the
users in a different way, subjective attributes can be rated as well
as weighted. So SubjectiveAttribute has the association
has_many :ratings and has_many :users, :through => :ratings.
belongs_to :attributable, :polymorphic => true
has_many :users, :through => :weights
def SubjectiveAttribute < Attribtue
has_one :attribute, :as => :attributable
has_many :users, :through => :ratings
Is this ok or are there problems which could occur that I'm no seeing?
Are there going to be clashes or confusion when I do something like
sub_attribute.users or attribute.users?
Thanks in advance.