Rails makes AJAX even easier!

I already thought that AJAX was pretty darn easy in Rails. But the amazing Rails team has managed to make AJAX as close to dead-simple as is realistically possible. (I better be careful about such statements, next month they will probably prove me wrong!)

A new feature called JavaScript Generator Templates is in the subversion repository (but not yet released) that makes sophisticated AJAX usage so easy it just blows me away… seriously!

Cody Fauser has a nice writeup describing this new feature and showing how to use it.

Unlike conventional templates which are used to render the results of an action, these templates generate instructions on how to modify an already rendered page. This makes it easy to modify multiple elements on your page in one declarative Ajax response. Actions with these templates are called in the background with Ajax and make updates to the page where the request originated from.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s