if session[:intended_action] && session[:intended_controller]
redirect_to :action => session[:intended_action],
:controller => session[:intended_controller]
else
redirect_to :action => ‘index’
end
Your authorize before_filter is not setting those values into the
session before redirecting user to the login controller. What does
your before_filter look like?
I have a before filter -
before_filter :check_authentication
def check_authentication
unless session[:user]
session[:intended_action] = action_name
session[:intended_controller] = controller_name
redirect_to :action => “signin”
end
end
The main index will be where users can login or register.
However after logging in they should be returned to the main index
with a greeting for them
and the register and login box gone.
Stuart
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.