Added relation between EventSchedule and program model

Program has many event_schedules through schedules
This commit is contained in:
Siddhant Bajaj 2017-04-12 23:06:17 +05:30
parent 7ce816e146
commit 7ff34c5b23

View file

@ -10,6 +10,7 @@ class Program < ActiveRecord::Base
has_many :tracks, dependent: :destroy
has_many :difficulty_levels, dependent: :destroy
has_many :schedules, dependent: :destroy
has_many :event_schedules, through: :schedules
belongs_to :selected_schedule, class_name: 'Schedule'
has_many :events, dependent: :destroy do
def require_registration