# -*- 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 before_validation do if self.survey_item_answer.field_type == 2 and !self.content? #errors.add(:content, 'doit ĂȘtre remplis') end end end