I'm trying to create a rails app where user can create events and invite participants to it and need your help! I've been going in circle, trying few things but doesn't seem right at all and this is now driving me crazy!! I'm using rails 4.
How would you setup the active model?
User
has_many :events through :meeting //for the participants?
has_many :events // for the organizer?
Event
belongs to :user
has_many :participants, class_name: "User"
Participant
belongs to :user
has_many :events through :meeting
Meeting
has_many :participants
has_many :events
Does that make any sense? Do I need the Participant Model or am I just over-engineering it? I guess I'm a bit confused with organizer is a user and participants are also users and meeting needs both organizer and participants so not so clear how to make this work...
Also read I could build the meeting relationship only when participant has been added. Would that be the way to go? Thank you!