Module: Helena::Concerns::Questions::Requirable

Extended by:
ActiveSupport::Concern
Included in:
Questions::CheckboxGroup, Questions::LongText, Questions::RadioGroup, Questions::RadioMatrix, Questions::ShortText
Defined in:
app/models/helena/concerns/questions/requirable.rb

Instance Method Summary collapse

Instance Method Details

#validate_answers_in(answers) ⇒ Object



11
12
13
14
15
# File 'app/models/helena/concerns/questions/requirable.rb', line 11

def validate_answers_in(answers)
  errors = {}
  errors[code] = :blank if answers[code].blank? && required
  errors
end