Update the index view ajax

Dear rails mailing list,

First a big thank you to everyone for you past, present an future
help… learned a lot fro here.

I saw some relater threads on this but I need some more direct answers.

I generated with scaffold an object which has multiple attributes. Some
of those attributes in the database get dynamically updated in the
background in the background by some external scripts/delayed jobs etc.

How can I get the index view to dynamically update those attributes
withought getting the user to manually refresh the web page?

Merci,

Julien

Use Faye. http://faye.jcoglan.com/


Dheeraj K.

Thanks Dheeraj but I don’t think this is what im looking for as my app
runs on heroku. I was hoping there would be a gem that solves this
problem

On 15 January 2013 02:29, Julien E. [email protected]
wrote:

Dear rails mailing list,

First a big thank you to everyone for you past, present an future help…
learned a lot fro here.

I saw some relater threads on this but I need some more direct answers.

I generated with scaffold an object which has multiple attributes. Some of those
attributes in the database get dynamically updated in the background in the
background by some external scripts/delayed jobs etc.

How can I get the index view to dynamically update those attributes withought
getting the user to manually refresh the web page?

One solution, probably the easiest, is to use javascript to
periodically request a page refresh (probably via AJAX).

Colin

You can run Faye on Heroku.

If you don’t want to use it, try PusherApp. If you don’t want to use
that either, poll periodically with AJAX.


Dheeraj K.

You might want to keep your eye out for Rails 4, in particular for what
Aaron presents here:
http://www.confreaks.com/videos/1291-rubyconf2012-real-time-salami

– start watching at 15:00, with a demo at 22:00