0
报告,has_many答案和答案belongs_to报告。显示嵌套形式和作品,但对于5个答案我有活动管理/ formtastic,将所有输入添加到一个块中
添加答案
回答__
添加答案
回答__
[未来3 ]
我如何将它们组合成一个带有标题“添加答案”的单个块和5个输入?
form do |f|
f.inputs "New Report" do
f.input :title
f.input :type
f.input :help_text
f.input :text_box_present
f.input :text_box_default
f.input :template_id
end
f.inputs "ADD Answers", for: :answers do |a|
a.input :text, label: "Answer", required: false
end
f.actions
end