hmm, im getting similar problems, i have the following url im trying to save: http://127.0.0.1:3000/photos/view?book=1&id=2 The problem is, when I use url_for {request.parameters}, it doesnt include the ?book=1&id=2 part. However, when I do "puts request.parameters[:id]", I get "2" Whats going on here? I too am trying to save the incoming url for redirecting later. -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
You don''t need to save the URL, just the parameters hash. My current(and first real) project does basically what they do in AWDWR: session[:jumpto] = request.parameters in a before_filter for the pages I want to be able to jump back to. Works great. Jason Eric Gross wrote:> hmm, im getting similar problems, i have the following url im trying to > save: > > http://127.0.0.1:3000/photos/view?book=1&id=2 > > The problem is, when I use url_for {request.parameters}, > > it doesnt include the ?book=1&id=2 part. However, when I do "puts > request.parameters[:id]", I get "2" > > Whats going on here? I too am trying to save the incoming url for > redirecting later. > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
oh thats right, you can pass a hash into redirect_to...awesome! works great! -- Posted via http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---