0
I’ll have the model Tag
he’s gonna have a relationship HABTM
with POSTS
.
But I want him to have a relationship too HABTM
with USERS
because my goal is in the future to be able to find posts that have the same tags as the user.
How do I do it? Create a common relationship by creating two separate tables for both? And then, how do I search posts that have the same tags as a user?
One more comment. You can use the option :through in has_and_belongs_to_many. I never tried, but after you are with the 5 tables and the relationships working you can try adding this option.
– hsgubert