Forum: Ruby on Rails update the index view ajax

Posted by Julien Estebane (Guest)
on 2013-01-15 03:31
(Received via mailing list)
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
Posted by Dheeraj Kumar (Guest)
on 2013-01-15 05:29
(Received via mailing list)
Use Faye. http://faye.jcoglan.com/

--
Dheeraj Kumar
Posted by Julien Estebane (Guest)
on 2013-01-15 05:40
(Received via mailing list)
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
Posted by Colin Law (Guest)
on 2013-01-15 08:58
(Received via mailing list)
On 15 January 2013 02:29, Julien Estebane <julienestebene@gmail.com> 
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
Posted by Dheeraj Kumar (Guest)
on 2013-01-15 09:39
(Received via mailing list)
You can run Faye on Heroku. 
https://github.com/ntenisOT/Faye-Heroku-Cedar

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

--
Dheeraj Kumar
Posted by Emily S (Guest)
on 2013-01-15 22:42
(Received via mailing list)
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-...

-- start watching at 15:00, with a demo at 22:00
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.