Best way to implement User model with Interests?

15 views
Skip to first unread message

Cameron Craig

unread,
Apr 2, 2014, 11:09:42 PM4/2/14
to rubyonra...@googlegroups.com
I have a model with a belongs_to relationship to my Category model. I now need to implement a User model where a user can select each category they are interested in out of all categories available in the database. Since Category shares a relation with the another object I don't know if a HABTM would still work?

Colin Law

unread,
Apr 3, 2014, 4:42:50 AM4/3/14
to rubyonra...@googlegroups.com
There is no problem with category has_many widgets and at the same
time category habtm users. I don't like habtm much, however, and
generally use has_many through so that I can see more clearly what is
going on. Either is ok for your use case however.

Colin
Reply all
Reply to author
Forward
0 new messages