Closed BrentBarnes closed 2 years ago
First draft associations!
-Booking belongs_to :flight has_many :passengers
-Passenger belongs_to :flight belongs_to :booking
-Flight has_many :bookings has_many :passengers
Should Flight's associations be something like this instead?
has_many :passengers, through: :bookings ???
edit: Don't think this is necessary as all below associations work
Should be able to run these queries:
Set up associations between Bookings, Passengers, and Flights.