Sha256: 6d95e4daa73fefc7be0c3ecdde67da45031c49620af3150226104d65c04d6b4a

Contents?: true

Size: 551 Bytes

Versions: 15

Compression:

Stored size: 551 Bytes

Contents

module Helena
  module Questions
    class RadioMatrix < Helena::Question
      include Helena::Concerns::Questions::Requirable
      include Helena::Concerns::Questions::ValidatesOneLabel

      def includes_labels?
        true
      end

      def includes_subquestions?
        true
      end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
helena-2.1.0 app/models/helena/questions/radio_matrix.rb
helena-2.0.2 app/models/helena/questions/radio_matrix.rb
helena-2.0.1 app/models/helena/questions/radio_matrix.rb
helena-2.0.0 app/models/helena/questions/radio_matrix.rb
helena-1.3.1 app/models/helena/questions/radio_matrix.rb
helena-1.3.0 app/models/helena/questions/radio_matrix.rb
helena-1.1.0 app/models/helena/questions/radio_matrix.rb
helena-1.0.3 app/models/helena/questions/radio_matrix.rb
helena-1.0.2 app/models/helena/questions/radio_matrix.rb
helena-1.0.1 app/models/helena/questions/radio_matrix.rb
helena-1.0.0.rc4 app/models/helena/questions/radio_matrix.rb
helena-1.0.0.rc3 app/models/helena/questions/radio_matrix.rb
helena-1.0.0.rc2 app/models/helena/questions/radio_matrix.rb
helena-1.0.0.rc1 app/models/helena/questions/radio_matrix.rb
helena-0.3.3 app/models/helena/questions/radio_matrix.rb