I do something similar in one of my apps. The way I handle it is using periodically_call_remote every 6 seconds and check it against a controller action which looks at the DB to see if any new records were added for that user since the last time it checked. If there are, do a render :update |page| and add an insert_html with the new record on top.
Naturally you can increase or decrease the time between checks, but I figure 5-10 seconds should be good for anyone. For my specific app, if I was scraping 5 items specifically, the periodically_call_remote function would turn itself off after I returned 5 records. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---