Displaying 1 result from an estimated 1 matches for "usercounties".
Did you mean:
user_counties
2006 May 21
3
has_many :through with a polymorphic join
...ferent set of properties, that''s
why there''s one table for uk_counties and one for us_counties, with
more to follow when more countries are supported). This would require:
class User...
has_many :counties, :through => user_counties #counties is the imaginary table
end
class UserCounties
belongs_to :counties, :polymorphic => true
end
Is this possible? If not, can anyone think of a way around it other
than adding another table into the chain? And (bonus question... not
required, just for fun) what would the reverse relationship look like
(ie, how would uk_counties relate to u...