开发者

rails form post to index

开发者 https://www.devze.com 2023-02-01 13:44 出处:网络
I have a form with <% form_tag :controller => \'mycon开发者_JAVA百科troller\', :action => \'index\', :method => \'post\'

I have a form with

<% form_tag :controller => 'mycon开发者_JAVA百科troller', :action => 'index', :method => 'post' 

But when i submit it... it goes to the mycontroller#create action.

why? am i missing something?


Go to here: http://guides.rubyonrails.org/routing.html and check this topic: 2 Resource Routing: the Rails Default

You are using the method post that defaults to the action create.

0

精彩评论

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

关注公众号