gravier_app/app/models/answer_set.rb
2017-09-21 12:37:53 +02:00

20 lines
375 B
Ruby

# -*- encoding : utf-8 -*-
class AnswerSet < ActiveRecord::Base
belongs_to :question_set
belongs_to :survey_item_answer
#attr_accessible :content, :survey_item_answer_id, :is_checked, :position
before_validation do
if self.survey_item_answer.field_type == 2 and !self.content?
#errors.add(:content, 'doit être remplis')
end
end
end