Simpleton routes

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 Sat, Sep 15, 2012 at 8:57 PM, Joshua N. [email protected]
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: Layouts and Rendering in Rails — Ruby on Rails Guides


Hassan S. ------------------------ [email protected]

twitter: @hassan

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 Sun, Sep 16, 2012 at 8:55 PM, Joshua N. [email protected]
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 :slight_smile:

If that’s not enough, post your request code and the corresponding
method from your controller.


Hassan S. ------------------------ [email protected]

twitter: @hassan

Indeed, you are right! I saw what I was doing wrong.

Thank you,
Josh
“In your wisdom, I am humbled”