Auto refresh field


I would to know if it is possible to automaticly refresh some
particular field ?
Clearly, I have a model called "productions" with fileds "name" and
Another application update fields "numbers" of the mysql table.
On an "index.html.erb", I have the list of "production" and i would
like to view automaticly when value of "numbers" change.

First of all, is it possible ?
Because I may have many records, and in a close futur, more fields to
monitor, I would like to update just choosen filed and not the whole

Thanks in advance.

PS : I just begun with ror...


Look at the prototype helper : periodically_call_remote
It will call an action each X second. In this action, you should have
a render like :

render :update do |page|
   page['my_field_id'].replace_html "<p>updated!</p>"

Ok, i do understand the idea, but i don’t know where to apply it…

I finally find how to do :
In the controler I create a method :
def update_nbpiece
@production = Production.find(params[:id])
render :text=>@production.numbers
Then in the index.html.erb, inside the for loop :
<%= periodically_call_remote(:update => “nbpiece_id_” +, :url => {:action => “update_nbpiece”, :id=>}, :frequency => 1 )%>

<%=h production.numbers%> ... Now the strange thinks, is that when use the Aptana's internal browser, it works, but when I run another web browser, like IE or Firefox, I got the following error : **PeriodicalExecuter is not [defined]( [rails](**

Any ideas ??

Maybe Aptana automatically include links to prototype as it misses.
You have to include in your page header :

<%= javascript_include_tag :all %>

or less (don't know wich file is needed for the updater) :

<%= javascript_include_tag 'prototype' %>


that’s it!

Thanks !