Class: Comee::Core::TransportAvailability
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Comee::Core::TransportAvailability
- Defined in:
- app/models/comee/core/transport_availability.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ransackable_attributes(_auth_object = nil) ⇒ Object
15 16 17 |
# File 'app/models/comee/core/transport_availability.rb', line 15 def self.ransackable_attributes(_auth_object = nil) %w[id availability_date weekday weekday_short] end |
Instance Method Details
#compute_weekday ⇒ Object
10 11 12 13 |
# File 'app/models/comee/core/transport_availability.rb', line 10 def compute_weekday self.weekday = availability_date.strftime("%A") self.weekday_short = availability_date.strftime("%a") end |