我试图在页面中插入一个simple_form下拉列表,但是在显示列表项时遇到麻烦(两个电子邮件地址-conatct@test.com和support@test.com)。当我单击下拉列表箭头时,它们根本不会显示,因为它们不存在。
.reveal.doubt id="doubt-material-#{material.id}" data-reveal=true
button.close-button data-close=true aria-label="Close reveal" type="button"
span aria-hidden="true" ×
h5 #{t 'students.materials.index.questions.button'}
p #{t 'students.materials.index.questions.form_explanation'}
= simple_form_for [:student,trail,component,material,material_student,doubt],html: { id: "doubt" },remote: true do |f|
= f.input :recipient,collection => %w(contact@test.com,support@test.com),label: "#{t 'students.materials.index.questions.form_send_email'}"
= f.input :question,as: :text,label: true,label: "#{t 'students.materials.index.questions.form_message'}",input_html: { rows: "2" }
= f.submit "#{t 'students.materials.index.questions.form_send_button'}",class: 'button primary-button-active'
当我检查代码时,它似乎可以正常工作,但是在任何地方都看不到电子邮件选项。
我添加的代码行是:
= f.input :recipient,collection: %w(contact@test.com,label: "#{t 'students.materials.index.questions.form_send_email'}"
这是怎么了?