pic_vert_app/app/models/answer_set.rb
2012-08-18 12:07:32 +02:00

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