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
9
app/models/survey_submission.rb
Normal file
9
app/models/survey_submission.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class SurveySubmission < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
belongs_to :survey
|
||||
has_many :survey_replies, through: :user
|
||||
|
||||
validates :user_id, uniqueness: { scope: :survey_id }
|
||||
|
||||
accepts_nested_attributes_for :survey_replies
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue