Displaying 1 result from an estimated 1 matches for "number_of_guests".
2013 Feb 26
4
3 models, joining and nested queries
...primary_key=''ref''
has_many :bookings, :class_name=>"Booking",
:foreign_key=>''room_ref''
belongs_to :host
Class Booking
ref: string
room_ref :string
start_date: date
end_date: string
number_of_guests :integer
primary_key=''ref''
belongs_to :room
Here one should be able to see the vacancies against each host.
A person when he enters the start date, end date and number of persons to
book for a room, he must get the list of hosts who have rooms vacant and
numbe...