我想在一个视图中渲染两个表单,但是只渲染第一个表单标记。第二个被忽略了。
代码段:
#form_1
= form_tag(controller: "auto_discover", action: "foo")
#form_2
= form_tag(controller: "auto_discover", action: "bar")
HTML生成(剪切):
<div id="form_1">
<form accept-charset="UTF-8" action="/services/autodiscover/auto_discover/foo" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" value="✓" type="hidden"><input name="authenticity_token" value="hCb2xmXWSiwCpyVcqQJe6rHZjEvpc1pcfA1Ru7kytRo=" type="hidden">
...
</form></div>
<div id="form_2">
...no form...</div>