2016-06-28 18:16:06 +03:00
|
|
|
class Survey < ActiveRecord::Base
|
|
|
|
|
belongs_to :surveyable, polymorphic: true
|
|
|
|
|
has_many :survey_questions
|
2016-06-30 17:28:07 +02:00
|
|
|
has_many :survey_submissions
|
2016-06-28 18:16:06 +03:00
|
|
|
|
2016-06-30 12:09:21 +02:00
|
|
|
enum target: [:after_conference, :during_registration]
|
2016-06-28 18:16:06 +03:00
|
|
|
validates :title, presence: true
|
|
|
|
|
end
|