rake routes
显示
create_multiple_allotments POST /allotments/create_multiple(.:format) allotments#create_multiple
表单调用
<%= form_tag create_multiple_allotments_path, :method => :post do %>
然而,提交表单自行完成:
Started GET "/allotments/create_multiple? [...]
Processing by AllotmentsController#show as HTML
路线定义
resources :allotments do
collection do
post :create_multiple
end
end
为什么rails坚持要搞定?
答案 0 :(得分:0)
找出问题的根源。
表单错误地是前面指定的get
方法。更改了路由和表单。但是浏览器缓存已经提供并仍在发送旧设置。
...傻