Is there some way to keep rails from trying to open a page on a route? Basically I just want to send an ajax query to: http://localhost:3000/method/multiply?num1=3&num2=4 while staying on http://localhost:3000/index Thanks Josh -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/eW5X9hMoJowJ. For more options, visit https://groups.google.com/groups/opt_out.
On Sat, Sep 15, 2012 at 8:57 PM, Joshua Niehus <jm.niehus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there some way to keep rails from trying to open a page on a route? > Basically I just want to send an ajax query to: > http://localhost:3000/method/multiply?num1=3&num2=4 > > while staying on http://localhost:3000/indexSee: http://guides.rubyonrails.org/layouts_and_rendering.html -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
None of those seem to help, Rails just goes to some blank page with either: a) render :nothing => true b) head (blah blah...) I have an ajax request for the server to check something for me but i do not want to be redirected anywhere when I call it... not to a blank page or some generated template page, I just want the text response> See: http://guides.rubyonrails.org/layouts_and_rendering.html > > -- > Hassan Schroeder ------------------------ hassan.s...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:> > http://about.me/hassanschroeder > twitter: @hassan >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/iQYWdekzdOIJ. For more options, visit https://groups.google.com/groups/opt_out.
On Sun, Sep 16, 2012 at 8:55 PM, Joshua Niehus <jm.niehus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> None of those seem to help, Rails just goes to some blank pageActually, your app goes to some blank page. The guide I linked to earlier explains how to control that :-) If that''s not enough, post your request code and the corresponding method from your controller. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Indeed, you are right! I saw what I was doing wrong. Thank you, Josh "In your wisdom, I am humbled" On Sunday, September 16, 2012 10:26:02 PM UTC-7, Hassan Schroeder wrote:> > Actually, your app goes to some blank page. The guide I linked to > earlier explains how to control that :-) > > If that''s not enough, post your request code and the corresponding > method from your controller. > > -- > Hassan Schroeder ------------------------ hassan.s...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:> > http://about.me/hassanschroeder > twitter: @hassan >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/cIVJiOpeyTEJ. For more options, visit https://groups.google.com/groups/opt_out.