使用form_for和Rails单元格gem

时间:2016-05-31 06:39:54

标签: ruby-on-rails cells

我使用cells gem创建Wall组件。并使用下一代码在app/cells/wall/show.haml

中呈现表单
= form_for :messagess do |f|
  = f.text_field :test

但输出包含

<form action="http://test.localhost:3000/" accept-charset="UTF-8" method="post">
    <input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="0OScxNnGoB47HW4YNIJ2ERhSDcPCcEbEGflI8Wq05FC0ny6XuYh4rWwHY5nOigXDIGZRJqg1HLN1OQ2J4CVEEw==" />
    &lt;input type=&quot;text&quot; name=&quot;messagess[test]&quot; id=&quot;messagess_test&quot; /&gt;
</form>

我做错了什么?

0 个答案:

没有答案