app/models/tramway/event/event.rb in tramway-event-1.2.2 vs app/models/tramway/event/event.rb in tramway-event-1.2.3

- old
+ new

@@ -2,6 +2,10 @@ mount_uploader :photo, PhotoUploader has_many :participants, class_name: 'Tramway::Event::Participant' has_many :participant_form_fields, class_name: 'Tramway::Event::ParticipantFormField' has_many :sections, class_name: 'Tramway::Event::Section' + + enumerize :status, default: :common, in: [ :common, :main ] + + scope :main_event, -> { where(status: :main).last } end