app/models/tramway/event/event.rb in tramway-event-1.9.18.1 vs app/models/tramway/event/event.rb in tramway-event-1.9.18.2
- old
+ new
@@ -5,9 +5,10 @@
has_many :participant_form_fields, class_name: 'Tramway::Event::ParticipantFormField'
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'
+ has_and_belongs_to_many :places
enumerize :status, default: :common, in: [ :common, :main ]
scope :main_event, -> { where(status: :main) }
scope :actual, -> { where 'end_date > ?', DateTime.now }