【发布时间】:2011-04-20 05:23:31
【问题描述】:
我正在使用acts_as_commentable。这就是模型添加 cmets 的方式:
commentable = Post.create
commentable.comments.create(:title => "First comment.", :comment => "This is the first comment.")
可以在此处找到宝石的详细信息:
https://github.com/jackdempsey/acts_as_commentable
在 formtastic 中,我通常会传递模型,然后是输入字段....这仍然有效吗?
<%= semantic_form_form 'review' do |form| %>
<%= form.input :title %>
<%= form.input :comment %>
<% end %>
在控制器中....?
commentable.comments.create(params(:review))
我不确定这是否会传递可用的哈希值....谢谢!
【问题讨论】:
-
哦,是的,我想我也希望它提交远程....。
标签: ruby-on-rails forms formtastic acts-as-commentable