In the course of integrating an authentication module (Authlogic) into
my Rails app, I've developed the following priority:
'If the current user makes a url request for which they are
ineligible, return the user to the page from which they made their
One way to get at this is with the following two methods in the
session[:return_to] = request.request_uri
redirect_to(session[:return_to] || default)
session[:return_to] = nil
But if I wanted to guarantee that the user was redirected back to any
action from which they made an ineligible request, I would need to
call store_location for every such controller action, which is crazy.
Is there no inexpensive way that Rails will remember every last
request (without resort to session)?
My hope would be for something like:
But this is a no-go...