使用管理命名空间在rails上重定向循环
问题描述:
我有一个从Admin :: ApplicationController扩展的Admin :: SessionsController。 我正在使用before_filter除了登录页面,但服务器正在进入一个循环 我认为这是东西与除了东西,我认为我需要设置命名空间或东西...使用管理命名空间在rails上重定向循环
这是before_filte线:
before_filter :authenticate_user , :except => { :sessions => :new }
这是我SessionController
class Admin::SessionsController < Admin::ApplicationController
def new
end
end
答
这可能是最简单的办法把一个skip_before_filter在Admin:SessionsController
class Admin::SessionsController < Admin::ApplicationController
skip_before_filter :authenticate_user, :only => [:new]
def new
end
end
谢谢......我这样做了,但是用了skip_filter,而不是skip_before_filter ......谢谢! – rizidoro 2012-02-15 18:38:41