Replace usage of deprecated member_label option in forms with Array of label/value pairs
This commit is contained in:
parent
c00b04e9e8
commit
13f0f9703d
1 changed files with 3 additions and 4 deletions
|
|
@ -1,8 +1,7 @@
|
|||
= f.inputs 'Additional Info' do
|
||||
- @conference.questions.each do |q|
|
||||
- if q.question_type.id == 1 || q.question_type.id == 2 # yes/no or single choice
|
||||
= f.input :qanswers, :collection => q.qanswers, :as => :select, :input_html => { :multiple => false }, label: q.title, :include_blank => "Please make your choice",
|
||||
:member_label => Proc.new {|a| a.answer.title}
|
||||
= f.input :qanswers, :collection => q.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :select, :input_html => { :multiple => false },
|
||||
label: q.title, :include_blank => "Please make your choice"
|
||||
- if q.question_type.id == 3 # multiple choice
|
||||
= f.input :qanswers, :collection => q.qanswers, :as => :check_boxes, label: q.title,
|
||||
:member_label => Proc.new {|a| a.answer.title}
|
||||
= f.input :qanswers, :collection => q.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :check_boxes, label: q.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue