我的设计有问题。当用户已经登录,然后单击登录链接时,什么也没有发生,但这里是我的终端中的输出:
Filter chain halted as :require_no_authentication rendered or redirected
这发生在我要去的时候Processing by SessionsController#new as HTML
after_sign_in_path
有什么办法,如果有登录用户,我怎么能告诉设计去?
这是我的 after_sign_in_path
def after_sign_in_path_for(resource)
if session[:user_return_to]
return_to = session[:user_return_to]
session[:user_return_to] = nil
return_to
else
redirect_path(resource)
end
end