Class: BookingState
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BookingState
- Defined in:
- app/models/booking_state.rb
Overview
This represents the state of a booking.
The state of a Booking on the system.
Instances of states should be unique among the system. Use singleton methods such as pending to retrieve them.
Schema Information
Table name: booking_states
id :integer not null, primary key
label :string not null
created_at :datetime not null
updated_at :datetime not null
Class Method Summary (collapse)
Class Method Details
+ (Object) accepted
27 28 29 |
# File 'app/models/booking_state.rb', line 27 def self.accepted find_by! label: 'accepted' end |
+ (Object) cancelled
35 36 37 |
# File 'app/models/booking_state.rb', line 35 def self.cancelled find_by! label: 'cancelled' end |
+ (Object) pending
23 24 25 |
# File 'app/models/booking_state.rb', line 23 def self.pending find_by! label: 'pending' end |
+ (Object) rejected
31 32 33 |
# File 'app/models/booking_state.rb', line 31 def self.rejected find_by! label: 'rejected' end |