diff --git a/app/views/conference_registrations/_questions.html.haml b/app/views/conference_registrations/_questions.html.haml index f86dd640..6e7478d6 100644 --- a/app/views/conference_registrations/_questions.html.haml +++ b/app/views/conference_registrations/_questions.html.haml @@ -4,10 +4,10 @@ .form-group - if question.question_type.title == 'Yes/No' || question.question_type.title == 'Single Choice' = f.label :qanswer_ids, question.title - = f.select :qanswer_ids, options_from_collection_for_select(question.qanswers.joins(:answer), :id, 'answer.title'), { include_blank: 'Please make your choice' }, { multiple: false, class: 'form-control' } + = f.select :qanswer_ids, options_from_collection_for_select(question.qanswers.includes(:answer), :id, lambda { |qa| qa.answer.title }), { include_blank: 'Please make your choice' }, { multiple: false, class: 'form-control' } - if question.question_type.title == 'Multiple Choice' = f.label :qanswer_ids, question.title - - question.qanswers.joins(:answer).each do |qanswer| + - question.qanswers.includes(:answer).each do |qanswer| .checkbox %label = f.check_box :qanswer_ids, { multiple: true }, qanswer.id, nil