Rails3, filter chain is stopped as: require_no_authentication, processed or redirected

I have a design problem. When the user has already logged in and then clicks on the login link, nothing happens, but it is displayed in my terminal:

Filter chain halted as :require_no_authentication rendered or redirected 

This happens when I'm going to Processing by SessionsController#new as HTML

Is there any way I can say what come up with to go to after_sign_in_path if there is a registered user?

here is my 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 
+4
source share
2 answers

Perhaps you should consider adding a filter to the controller?

 prepend_before_filter :require_no_authentication, :only => [:action1, :action2] 
0
source
 def after_sign_in_path_for(resource) if (return_to = session[:user_return_to]) session[:user_return_to] = nil return_to return else redirect_path(resource) end end 

I'm not sure if this works, but maybe use can use after_filter

0
source

All Articles