即時通訊設備與註銷出現問題,當我嘗試註銷時,它獲得以下錯誤消息,其尋找用戶與id = sign_out。有什麼建議麼?註冊與設計不起作用
ActiveRecord::RecordNotFound in UsersController#show
Couldn't find User with id=sign_out
路線
devise_for :users
match 'users/settings', to: 'users#settings'
resources :users, only: [:show, :update]
鏈接
<%= link_to 'Logout', destroy_user_session_path, :method => :delete %>
耙路線
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
users_settings /users/settings(.:format) users#settings
user GET /users/:id(.:format) users#show
PUT /users/:id(.:format)
你解決了嗎?具有與軌道完全相同的問題4 – Anchor
不好意思看看我的舊代碼,但無法弄清楚我必須改變它的工作。我所能記得的是我改變了我的devise_for:users和match'users/settings'的順序,以:'users#settings'在我的路線文件中:( – Pierre