Is there a Rails-friendly way to redirect_to an url and post some parameters with that? I''ve tried: redirect_to("http://whatever.com", { ''postme'' => ''this'' }) redirect_to("http://whatever.com", :post => { ''postme'' => ''this'' }) redirect_to("http://whatever.com", :options => { ''postme'' => ''this'' }) ... and no love. Thanks! -- David Humphreys dave@dbhumphreys.com
redirect_to("http://whatever.com?postme=this") On Thu, 2006-03-30 at 11:56 -0600, David Humphreys wrote:> Is there a Rails-friendly way to redirect_to an url and post some > parameters with that? > > I''ve tried: > > redirect_to("http://whatever.com", { ''postme'' => ''this'' }) > redirect_to("http://whatever.com", :post => { ''postme'' => ''this'' }) > redirect_to("http://whatever.com", :options => { ''postme'' => ''this'' }) > > ... and no love. > > Thanks! > > -- > David Humphreys > dave@dbhumphreys.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsCharlie Bowman http://www.recentrambles.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060330/53b83309/attachment-0001.html
Is this the only way to post/pass variables when redirecting a request to another server?> redirect_to("http://whatever.com?postme=this")I''d like to be able to hide the variables instead of sending them in the URL. For example, when logged into Basecamp you can view/create Writeboards without logging into Writeboard even though you are redirected to a different server/domain. It doesn''t appear to me that your login or authentication info is being passed from Basecamp to Writeboard in the URL. Does anyone know how this is done? Thanks! -- 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 -~----------~----~----~----~------~----~------~--~---
Ben Blakley wrote:> Is this the only way to post/pass variables when redirecting a request > to another server? > > >>redirect_to("http://whatever.com?postme=this") > > > I''d like to be able to hide the variables instead of sending them in the > URL. For example, when logged into Basecamp you can view/create > Writeboards without logging into Writeboard even though you are > redirected to a different server/domain. It doesn''t appear to me that > your login or authentication info is being passed from Basecamp to > Writeboard in the URL. Does anyone know how this is done? Thanks!According to http://ppewww.ph.gla.ac.uk/~flavell/www/post-redirect.html you can control whether a POST redirects as a GET or a POST by changing the response status code. But if you don''t need to do stuff in your action prior to redirecting you can just post directly to the external site from a form on your page. -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks Mark. I took another look at how 37signals did the Basecamp to Writeboard redirection and found out that it is handled by loading up an intermediate page on the Basecamp server that contains a pre-populated login form for Writeboard. That page has an onload Javascript function that then submits the form to Writeboard. Seems to work well except for those using IE PC with their security settings set to "High" as described here: http://everything.basecamphq.com/archives/000438.php -- 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 -~----------~----~----~----~------~----~------~--~---