Add surveys; custom generated by admins
Available during registration or after conference Co-authored-by: Shyukri <shshyukriev@suse.com> Co-authored-by: Henne <hvogel@opensuse.org> Co-authored-by: Moises <mdeniz@suse.com>
This commit is contained in:
parent
4e742d170f
commit
9f3c0eff5d
43 changed files with 701 additions and 17 deletions
|
|
@ -58,6 +58,16 @@ class Conference < ApplicationRecord
|
|||
through: :program,
|
||||
source: :events
|
||||
has_many :event_types, through: :program
|
||||
|
||||
has_many :surveys, as: :surveyable, dependent: :destroy do
|
||||
def for_registration
|
||||
where(target: targets[:during_registration])
|
||||
end
|
||||
|
||||
def after_conference
|
||||
where(target: targets[:after_conference])
|
||||
end
|
||||
end
|
||||
accepts_nested_attributes_for :venue
|
||||
accepts_nested_attributes_for :tickets, allow_destroy: true
|
||||
accepts_nested_attributes_for :sponsorship_levels, allow_destroy: true
|
||||
|
|
@ -1225,3 +1235,4 @@ class Conference < ApplicationRecord
|
|||
result
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/ClassLength
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue