mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
Introduce an association for the selected_schedule
Association in Program fot the selected_schedule
This commit is contained in:
parent
3f114629f9
commit
beb17165a2
10 changed files with 24 additions and 21 deletions
|
|
@ -8,6 +8,7 @@ class Program < ActiveRecord::Base
|
|||
has_many :tracks, dependent: :destroy
|
||||
has_many :difficulty_levels, dependent: :destroy
|
||||
has_many :schedules, dependent: :destroy
|
||||
belongs_to :selected_schedule, class_name: 'Schedule'
|
||||
has_many :events, dependent: :destroy do
|
||||
def require_registration
|
||||
where(require_registration: true, state: :confirmed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue