Module: Surveyor::Models::ResponseSetMethods::ClassMethods
- Defined in:
- lib/surveyor/models/response_set_methods.rb
Instance Method Summary collapse
Instance Method Details
#has_blank_value?(hash) ⇒ Boolean
27 28 29 30 31 |
# File 'lib/surveyor/models/response_set_methods.rb', line 27 def has_blank_value?(hash) return true if hash["answer_id"].blank? return false if (q = Question.find_by_id(hash["question_id"])) and q.pick == "one" hash.any?{|k,v| v.is_a?(Array) ? v.all?{|x| x.to_s.blank?} : v.to_s.blank?} end |