You'll probably want to adopt an approach similar to restful-
authetication's method:

def store_location
  session[:return_to] = request.request_uri
end

(call this from your action that shows users the login page - see
http://github.com/technoweenie/restful-authentication/blob/5799593a28bb88e98b8cfe32d2f207c753a2bd9b/generators/authenticated/templates/authenticated_system.rb
for details)

--Matt Jones

On Feb 24, 3:08 am, John Smith <[email protected]>
wrote:
> Thanks, but I can not do redirect_to :back, because it redirects to the
> login page. I'll need something different. One possibility is to use a
> session variables for my controller and method, but the problem is that
> sometimes I need also and id, like 'posts/11'. I would like something
> more general. I would like to be able to save all the url in a session
> variable and then be able to redirect back to it. Is it possible?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to