This commit is contained in:
Moisés Déniz Alemán 2016-06-30 10:43:49 +00:00 committed by GitHub
commit fdec9fe035
31 changed files with 603 additions and 23 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[:registration])
end
end
accepts_nested_attributes_for :venue
accepts_nested_attributes_for :tickets, allow_destroy: true