Rails 3 Devise problem -
i've got strange problem project. have rails 3 , devise , running, i've added custom route:
match '/users', :to => 'users#index', :as => "all_users", :via => "get"
my rake routes returns this:
marat@rails:~/projects/test$ rake routes | grep users new_user_session /users/sign_in(.:format) {:action=>"new", :controller=>"devise/sessions"} user_session post /users/sign_in(.:format) {:action=>"create", :controller=>"devise/sessions"} destroy_user_session /users/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"} user_password post /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"} new_user_password /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"} edit_user_password /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"} put /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"} user_registration post /users(.:format) {:action=>"create", :controller=>"devise/registrations"} new_user_registration /users/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"} edit_user_registration /users/edit(.:format) {:action=>"edit", :controller=>"devise/registrations"} put /users(.:format) {:action=>"update", :controller=>"devise/registrations"} delete /users(.:format) {:action=>"destroy", :controller=>"devise/registrations"} user_confirmation post /users/confirmation(.:format) {:action=>"create", :controller=>"devise/confirmations"} new_user_confirmation /users/confirmation/new(.:format) {:action=>"new", :controller=>"devise/confirmations"} /users/confirmation(.:format) {:action=>"show", :controller=>"devise/confirmations"} user_unlock post /users/unlock(.:format) {:action=>"create", :controller=>"devise/unlocks"} new_user_unlock /users/unlock/new(.:format) {:action=>"new", :controller=>"devise/unlocks"} /users/unlock(.:format) {:action=>"show", :controller=>"devise/unlocks"} user_comments /users/:user_id/comments(.:format) {:action=>"index", :controller=>"comments"} post /users/:user_id/comments(.:format) {:action=>"create", :controller=>"comments"} new_user_comment /users/:user_id/comments/new(.:format) {:action=>"new", :controller=>"comments"} edit_user_comment /users/:user_id/comments/:id/edit(.:format) {:action=>"edit", :controller=>"comments"} user_comment /users/:user_id/comments/:id(.:format) {:action=>"show", :controller=>"comments"} put /users/:user_id/comments/:id(.:format) {:action=>"update", :controller=>"comments"} delete /users/:user_id/comments/:id(.:format) {:action=>"destroy", :controller=>"comments"} users /users(.:format) {:action=>"index", :controller=>"users"} post /users(.:format) {:action=>"create", :controller=>"users"} new_user /users/new(.:format) {:action=>"new", :controller=>"users"} edit_user /users/:id/edit(.:format) {:action=>"edit", :controller=>"users"} user /users/:id(.:format) {:action=>"show", :controller=>"users"} put /users/:id(.:format) {:action=>"update", :controller=>"users"} delete /users/:id(.:format) {:action=>"destroy", :controller=>"users"} all_users /users(.:format) {:controller=>"users", :action=>"index"}
my controller:
class userscontroller::sessionscontroller < devise::sessionscontroller
i've got error:
expected /home/marat/projects/brandbk/app/controllers/users_controller.rb define userscontroller
what i'm doing wrong? how can add index action devise controller show users example. thanks.
change controller just:
class userscontroller < applicationcontroller
you're defining sessionscontroller rather userscontroller.
Comments
Post a Comment