Hi Folks I am new to Ruby on rails, coming from Asp classic.. Yap.. Guess its time to get up to date. Can anyone please point me in the right direction? I''ve currently setup an sms gateway which works through http gets and posts. My asp file uses response.redirect to trigger the sms gateway. I am developing my clients new webpage on RoR, and i''m not sure what the equivalent would be. Say I wanted my controller to call: http://sendthatsms/yay?message=thisisthemessage without redirecting the user with the call. The closest i''ve looked into atm, is the "redirect_to" method. Thx in advance. David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If all you want to do is send out a controller request but not actually send the user there, it sounds like you just want to send a POST request to that url. May I recommend looking into Net/HTTP or if you prefer http://simplehttp.rubyforge.org/ Using simple http, you could send the request as so: SimpleHttp.post("http://sendthatsms/yay", "message"=>"thisisthemessage") -- 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 -~----------~----~----~----~------~----~------~--~---
Thank you very much, ill be looking into this. It seems to be exactly what I need. On Sep 4, 2:18 pm, Nathan Esquenazi <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> If all you want to do is send out a controller request but not actually > send the user there, it sounds like you just want to send a POST request > to that url. May I recommend looking into Net/HTTP or if you preferhttp://simplehttp.rubyforge.org/ > > Using simple http, you could send the request as so: > > SimpleHttp.post("http://sendthatsms/yay", "message"=>"thisisthemessage") > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---