I trying to update multi times a page from inside a loop, obviously the loop cannot be outside the update block
as a test I wrote :
def reloading @tables = ["table_lockers", "table_instructors", "table_members", "table_analyses"] render :update do |page| @tables.each do |table| page.insert_html :bottom, 'table_list', "<li id='#{table}'>#{table}</li>" page.visual_effect :highlight, "#{table}" sleep 3 end end end
upon click on a start link remote Ajax call to the reloading action, this intend to insert the names of the tables one by one into a list area on the displayed page... with 3 sec between each insertion :
<ul>table_list table_lockers table_instructors table_members table_analyses
this doesn't work as expected as the render id performed at the end of the loop.... not in between