我在使用 devise 退出时遇到问题,当我尝试退出时收到以下错误消息,它正在寻找 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)