Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resources to learn Ajax with Rails 3 [closed]

Is there any good resources to learn Ajax(jQuery) with Rails 3?

like image 983
donald Avatar asked Dec 15 '10 11:12

donald


2 Answers

I'm just learning Rails 3 and finding this tutorial very useful

Chapter 12.2.5 (it is now in 11.2.5) has a bit on Ajax

like image 53
Ali Avatar answered Oct 06 '22 01:10

Ali


This Railscast is a good resource

But really, jQuery AJAX is what it is regardless of your framework. You can always have a click event fire an AJAX call to your controller, have your controller return a JSON object, and have a success handler that keys off of properties from this object to update the DOM. The main difference with Rails is that you can send back a js.erb template instead, which can execute some JavaScript as well as render some partials.

like image 34
Samo Avatar answered Oct 06 '22 01:10

Samo