I have a link_to_remote
function that updates columns in a table. However, it does not properly update the cell or its properties.
For example:
Here is the element I am updating:
<div id= "calendar_div_<%= i%>_<%=j%>" style = "display :inline;"><td class="checkedout">X</td></div>
Using this call:
<%= link_to_remote 'Current Week', :url => { :action => :current_week } %>
Calls:
render :update do |page|
page["Week_div"].replace_html session[:next_week].to_s
for i in 0..23 do
for j in 0..6 do
page["calendar_div_"+i.to_s+"_"+j.to_s].replace_html '<td class="available">Available</td>'
end
end
However, it never updates the <td>
tag properly. The element never updates the text properly nor does it color code the element (td.available
is defined to have a background color of green).