Hi guys, Quick problem that''s being annoying me for the last hour. Say I have redirect_to(:controller => ''account'', :action => ''x'') then I''m redirected to the page account/x fine. How would I get redirected to account/x?a=b&c=d&e=f... ? I have an array of parameters or a string of parameters, in either case I can''t find a way to redirect! Cheers, George -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Hi. I think you can use redirect_to with :params like this example: class SayController < ApplicationController def hello @time = Time.now redirect_to :action => ''goodbye'', :params => {"time" => @time} end def goodbye (*params) raise request.inspect.to_s end if you look at "REQUEST_URL" => "http://10.6.14.37:3000/say/goodby?time=Sat+Dec+16+03%3A59+2B0300+2006" you can pass more then one parameters {"time" => @time, "word" => "YES", ...} Best Regards, Sergey --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry, parameter (*params) dont need, you can simple write def goodby raise params[:time] end and you will see the time. Best Regards, Sergey --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---