我试图定期重新加载页面上的部分,但它似乎不起作用。当我第一次加载页面时,部分加载是正确的,但是当我向它引入新信息而不重新加载页面时,它不会更新。视图如下所示:
<div id="menuarea"style="height: 399px; width: 181px">
<%=periodically_call_remote(:url => {:action => :findnew}, :frequency => '20', :update => 'menuarea') %>
<p> Please select a color </p>
<%#partil renders the color table %>
<%= render :partial => "colortable" %>
</div>
def findnew
@bunny= Xparsing::Xmlparse.new
@fuzzybunny= @bunny.hex1
@pinkbunny=@bunny.pantone1
@blackbunny=@bunny.description1
render(:partial => 'colortable')
end
我所要做的就是重新加载部分颜色表而不重新加载页面。我每20秒在命令行中看到一次呈现颜色表,但是该表没有在页面上重新加载我需要修复什么?