Class: Booking
Overview
This represents a booking.
A kind of Slot that represents the Booking that a Customer reserves with a service Provider.
Schema Information
Table name: slots
id :integer not null, primary key
capacity :integer default("1")
min_booking_length :integer default("15")
created_at :datetime not null
updated_at :datetime not null
slot_group_id :integer
color_id :integer not null
type :string not null
provider_id :integer
booking_state_id :integer
period_id :integer not null
affiliation_id :integer
free_slot_id :integer
Instance Method Summary (collapse)
-
- (Booking) initialize
constructor
A new instance of Booking.
Methods inherited from Slot
Constructor Details
- (Booking) initialize
Returns a new instance of Booking
40 41 42 43 44 |
# File 'app/models/booking.rb', line 40 def initialize(*) super self.color ||= Color.blue self.booking_state ||= BookingState.pending end |