Improving surveys system: showing surveys in admin UI as they will be for the user
This commit is contained in:
parent
335608e6c4
commit
03168b4efe
15 changed files with 213 additions and 46 deletions
|
|
@ -34,7 +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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue