jQuery AJAX requests with Rails 3
Posted
by elsurudo
on Stack Overflow
See other posts from Stack Overflow
or by elsurudo
Published on 2010-06-15T04:44:10Z
Indexed on
2010/06/15
4:52 UTC
Read the original article
Hit count: 291
I'm trying to do a manual jQuery AJAX request the following way:
$("#user_plan_id").change(function() {
$("#plan_container").load('/plans/' + this.value);
});
I have the "rails.js" file included in my header, and a "<%= csrf_meta_tag %>".
I see from my log that the request IS getting to the server (although without the authenticity token... does rails.js even do this?), but the response is a 302 (Found) rather than 200, and no data actually gets rendered.
Any ideas?
© Stack Overflow or respective owner