Forum: Ruby on Rails Many to many relationship...I think

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ce3d2adecbe4d0c796250056d62b99fe?d=identicon&s=25 Cm Mircea (cmircea)
on 2006-04-19 23:20
Hello, I have an issue.

I have a users table (id,name)
Eg. 1, cmircea

Another table called features (id,feature)
Eg. 1,hair colour; 2,eye colour; 3,interests

Another table called attributes (id,feature_id,attribute)
Eg.
1,2,blue; 2,2,green; 3,2,black
3,3,computers; 4,3,music; 5,3,reading


How do I make the connection between users and attributes table?
So basically I want to set for every user hair colour, eye colour, and
interests?

Thanks.
This topic is locked and can not be replied to.