Open maclover7 opened 9 years ago
Any new thoughts on this?
has_many :passengers
Is this an agreeable first step? As you said, it's hard to do anything else without this.
Thanks for this! I think we're going to need a join/intermediary table between trips and passengers. (In case a user wants to on more than one trip) How does this look:
belongs_to :host, class_name: User
has_many :reservations
has_many :users, through: :reservations
belongs_to :trip
belongs_to :user
has_many :reservations
has_many :trips, through: :reservations
has_many :trips_organized, foreign_key: :host_id, class_name: Trip
We're also going to have organizers/hosts. That would probably be just a host attribute on each trip.
updated schema comment above
@maclover7 - Is this issue done?
Need to plan out how to store data in the DB. Must be done before anything else