【发布时间】:2012-09-08 13:23:55
【问题描述】:
我有点困惑 - 当用户创建成功时。
我可以打电话(工作)
if @wibiya_user.save
render :edit
end
但是为什么我写的时候
if @wibiya_user.save
format.html { redirect_to edit_wibiya_user_path(@wibiya_user) }
end
我收到路由错误:
No route matches {:action=>"edit", :controller=>"wibiya_users"}
但是我的路线中确实有:
resources :wibiya_users
...
rake routes
edit_wibiya_user GET /wibiya_users/:id/edit(.:format) wibiya_users#edit
为什么会这样?
【问题讨论】:
-
不应该 - 您能否向我们展示您从重定向的位置执行的完整操作,以及与
:wibiya_users资源相关的所有路由?
标签: ruby-on-rails routing