app/models/tramway/event/event.rb in tramway-event-1.9.11.1 vs app/models/tramway/event/event.rb in tramway-event-1.9.11.2
- old
+ new
@@ -6,10 +6,9 @@
has_many :sections, class_name: 'Tramway::Event::Section'
has_many :partakings, as: :part, class_name: 'Tramway::Event::Partaking'
has_many :partnerships, class_name: 'Tramway::Partner::Partnership', as: :partner
has_many :organizations, as: :partners, through: :partnerships, class_name: 'Tramway::Partner::Organization'
-
enumerize :status, default: :common, in: [ :common, :main ]
scope :main_event, -> { where(status: :main) }
scope :actual, -> { where 'end_date > ?', DateTime.now }
scope :past, -> { where 'end_date < ?', DateTime.now }