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格式,但以前的版本可以,如果有的話。
謝謝!