使用devise,cancan和rolify在我的rails 4.0.2应用程序上设置auth堆栈,并在尝试查看users/sign_in
或users/sign_up
时收到redirect_loop错误。
有谁知道是什么原因造成的?
我的路线档案
Rails::Application.routes.draw do
resources :events
resources :users
root :to => "home#index"
devise_for :users, :controllers => {:registrations => "registrations"}
end
答案 0 :(得分:0)
删除行:resources :users
,然后尝试......
Rails::Application.routes.draw do
resources :events
#resources :users # comment or remove this line
root :to => "home#index"
devise_for :users, :controllers => {:registrations => "registrations"}
end