This commit is contained in:
Moisés Déniz Alemán 2016-06-30 15:39:29 +00:00 committed by GitHub
commit 96ae730955
40 changed files with 694 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