开发者

Ruby on Rails: How do I specify which method a form_tag points to?

I have this:

<% form_tag :controller => :proposa开发者_如何学Cls, :method => :bulk_action do %>

but it errors in the create method... which is weird because I'm trying to tell stuff to delete.


The :method parameter specifies the HTTP request method. You're probably looking for :action instead:

<% form_tag :controller => :proposals, :action => :bulk_action do %>

This will create a form that points to bulk_action in ProposalsController.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜