70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'app/models/effective/ballot_response.rb', line 70
def response
return nil unless poll_question.present?
return date if poll_question.date?
return email if poll_question.email?
return number if poll_question.number?
return long_answer if poll_question.long_answer?
return short_answer if poll_question.short_answer?
return upload_file if poll_question.upload_file?
return poll_question_options.first if poll_question.choose_one?
return poll_question_options.first if poll_question.select_up_to_1?
return poll_question_options if poll_question.poll_question_option?
raise('unknown response for unexpected poll question category')
end
|