0

我收到路由错误

No route matches {:action=>"edit", :controller=>"projects"}

运行rake routes给了我以下信息:

   edit_user_project GET    /users/:user_id/projects/:id/edit(.:format)          projects#edit
        user_project GET    /users/:user_id/projects/:id(.:format)               projects#show
                     PUT    /users/:user_id/projects/:id(.:format)               projects#update
                     DELETE /users/:user_id/projects/:id(.:format)               projects#destroy

并且错误来自projects/new.

有什么想法有什么问题吗?

4

1 回答 1

0

@Thomas Klemm - 你得到了正确的答案。在这里发布以防其他人来寻找类似的错误。

注意:( edit_user_project_path或类似的)有 2 个参数,在这种情况下@user@project.

于 2013-02-06T19:13:41.667 回答