我有设计和用户控制器
路线.rb
devise_for :users
resources :users do
resources :blogs
end
users_controller.rb
class UsersController < ApplicationController
respond_to :html, :xml, :json
def create
@user = User.create(params[:user])
end
def show
@user = User.find(params[:id])
@asset = Asset.find(params[:id])
respond_with [@user, @asset]
end
def update
@user = User.find(params[:id])
@user.update_attributes(params[:user])
respond_with @user
end
end
当我访问http://localhost:3000/users/sign_out
我明白了
ActiveRecord::RecordNotFound in UsersController#show
Couldn't find User with id=sign_out
更新:
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
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
有什么解决办法吗?