Ok,
i have a little question.
I am developing an app and writing down the schema for my database i
have this 2 entities (we call them like this in italian, don’t know the
right word in english, sorry).
USER and RESOURCE
An user can submit a resource. So that’s a one-to-many relationship with
a simple has_many :resources and belongs_to :user
I then want users to have favourites Resources. So that’s a many-to-many
relationship but on the same entities as before!
How should i handle that?
Should i create a favourite table with user_id and resource_id and then
write something like: has_many_and_belongs_to :user, throught
:favourite?
Should i use the join_table option?
Should i change something on the user and resource tables?
Feel free to give your suggestions! Thank you!