I recently got a free copy of RJS Templates for Rails from the Milwaukee Ruby User’s Group. O’Reilly has a program that makes books available for free to Users Groups, which is a really nice thing (of course they bank on the word-of-mouth advertising that comes from it. Hi O’Reilly!
Inline code would look like:
render :update do |page|
Where an RJS template is automatically wrapped with the
render :update block.
page.insert_html :bottom, 'list', '
If you’re an AJAX whiz, I’d doubt that this would offer a lot unless you just wanted to see another implementation and didn’t know a lot about Rails. But if you want to see how easy it could be to add some really interesting AJAX features to a Rails application, this can help you get started. You’ll almost definitely want to get a more comprehensive book to give you some more ideas on how to handle a broader range of situations.
The October 2006 issue of MacTech has a really good article on RJS as well. It covers some of the same basics that the PDF covers, using a few different examples.