osem-fcy/app/models/schedule.rb
Ana a394293500 Do not use JS to initialize the schedule
- Only use JS for the drag&drop functionality and to the set/alter the time and rooms of the EventSchedule object.

- Introduce has_many :events, through: :event_schedules association to get unscheduled event easily
2016-08-11 15:11:27 +02:00

5 lines
157 B
Ruby

class Schedule < ActiveRecord::Base
belongs_to :program
has_many :event_schedules, dependent: :destroy
has_many :events, through: :event_schedules
end