<% form_for [commentable, Comment.new], :action => 'create', :remote => false do |f|%>
<%=f.hidden_field :commentable_id, :value=> commentable.id %><br/>
<%=f.hidden_field :parent_id, :value=>1 %><br/>
和一个控制器:
def create(commentable)
@commentable = commentable.find(params[:comment][:commentable_id])
如何将可评论类型传递给我的 for_for 中的创建操作?谢谢。