What is a good introduction to AJAX in Ruby on Rails?

I need good introductory pointers for AJAX in the context of a Ruby On Rails application.

Here's the scoop: my application combines several tasks using Delayed :: Job. Although the tasks are sprunging from external sites, I want the user to evaluate their progress. I don’t want to refresh the whole page - just a rectangle on the page where each task can display status messages.

I don’t think I need the full push technology - just use javascript-initiated polling to refresh the screen while the bg tasks are running.

This is a suitable scenario for AJAX (right?), And I think Rails3 has specific constructs to support AJAX-y interactions with browsers (right?). Ryan Bates Railscast on Polling For Changes is a good template for this particular case, but I would like to better understand what is currently happening under the hood. OK, then where to start?

For what it's worth, I'm already using jQuery in my Rails3 application.

+5
source share
3 answers

Just like numberblah said you need a memory queue. Take a look at apache activemq. He can just do what you need.

+2
source

RailsCasts.com is a really great resource:

http://railscasts.com/episodes?utf8=%E2%9C%93&search=ajax

+1
0
source

All Articles