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
on 2012-09-16 11:04
on 2012-09-16 14:53
On Sat, Sep 15, 2012 at 8:57 PM, Joshua Niehus <jm.niehus@gmail.com> 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/index See: http://guides.rubyonrails.org/layouts_and_rendering.html -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan
on 2012-09-17 05:56
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
on 2012-09-17 07:26
On Sun, Sep 16, 2012 at 8:55 PM, Joshua Niehus <jm.niehus@gmail.com> wrote: > None of those seem to help, Rails just goes to some blank page 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.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan
on 2012-09-17 17:53
Indeed, you are right! I saw what I was doing wrong. Thank you, Josh "In your wisdom, I am humbled"
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.