I’ve started learning Rails recently and have completed the sample app at http://ruby.railstutorial.org. I am trying to add user-created groups to the sample social network. I’ve gotten stuck at how exactly I should model the group. I know there should be a user_id of who owns the group and there should be strings of the name and description. Aside from that I have no idea what the rest of the group data model should look like. Thank you in advance.
I’ve started learning Rails recently and have completed the sample app at http://ruby.railstutorial.org .
Share
If you want a user to be in multiple groups your relations should be something like this