當我試圖刪除自己的帳戶在我的Rails應用程序我得到的Rails +設計:試圖刪除用戶帳戶
沒有路由匹配「/用戶」
筆者認爲:
<p>We hate to see you go. <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
我的路線:
user_registration POST /users(.:format) {:action=>"create", :controller=>"devise/registrations"}
new_user_registration GET /users/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"}
edit_user_registration GET /users/edit(.:format) {:action=>"edit", :controller=>"devise/registrations"}
PUT /users(.:format) {:action=>"update", :controller=>"devise/registrations"}
DELETE /users(.:format) {:action=>"destroy", :controller=>"devise/registrations"}
我錯過了什麼嗎?
resource_nam e =用戶。我只是嘗試傳遞current_user(這是一個用戶對象),我得到了相同的結果。 – Ryan 2012-01-11 03:39:56
不要緊,然後......刪除我的評論:-) – Mischa 2012-01-11 03:41:01
你可以發佈你的實際routes.rb文件? – jstim 2012-01-11 04:08:36