Rails noob here。我在rails 3应用程序中使用carrierwave,因此用户可以上传个人资料图片。我建立了一个单独的模型,控制器和视图(profile_pictures)来处理这个问题。为了避免犯错,我使用脚手架作为起点。轨道3中的路由错误应用程序
路由文件:
resources :profile_pictures
耙路线:
edit_profile_picture GET /profile_pictures/:id/edit(.:format) {:action=>"edit", :controller=>"profile_pictures"}
链接edit.html.erb:
<%= link_to "profile picture", edit_profile_picture_path %>
错误:
No route matches {:action=>"edit", :controller=>"profile_pictures"}
Side Note:我经常遇到路线问题......它让我疯狂。我发现了许多关于将先前路由格式转换为rails 3路由的页面。有关于解释所有nubbies的路线的基本教程? ...最好使用rails 3格式,但以前的版本可以,如果有的话。
谢谢!