2016-06-28 18:16:06 +03:00
|
|
|
class Survey < ActiveRecord::Base
|
|
|
|
|
belongs_to :surveyable, polymorphic: true
|
|
|
|
|
has_many :survey_questions
|
|
|
|
|
|
2016-06-29 17:23:01 +02:00
|
|
|
enum target: [:conference, :registration]
|
|
|
|
|
|
2016-06-28 18:16:06 +03:00
|
|
|
validates :title, presence: true
|
|
|
|
|
end
|