Class: Booking

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
AASM
Defined in:
lib/bookings/generators/templates/booking_model.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.currentObject



28
29
30
# File 'lib/bookings/generators/templates/booking_model.rb', line 28

def self.current
  where "starts_at >= ?", Date.today.beginning_of_day
end

Instance Method Details

#to_sObject



32
33
34
# File 'lib/bookings/generators/templates/booking_model.rb', line 32

def to_s
  "#{self.name}"
end