This commit is contained in:
Shyukri Shyukriev 2016-06-30 12:57:03 +00:00 committed by GitHub
commit 51fa77c9d5
38 changed files with 676 additions and 33 deletions

View file

@ -34,6 +34,11 @@ class Conference < ActiveRecord::Base
has_many :campaigns, dependent: :destroy
has_many :commercials, as: :commercialable, dependent: :destroy
has_many :subscriptions, dependent: :destroy
has_many :surveys, as: :surveyable, dependent: :destroy do
def for_registration
where(target: targets[:during_registration])
end
end
accepts_nested_attributes_for :venue
accepts_nested_attributes_for :tickets, allow_destroy: true