是否有一种优质的方法来更新“link_to_remote”中的文本并保持链接正常运行?基本上我有两个链接:
<%= link_to_remote "(#{building.charts.size} Charts)",{:url => {:action => "update_chart_matrix", :chartable_type => "building",:chartable_id => building.id, :title => building.name},
:update => 'chart-matrix',
}
%>
...和...
<%= link_to_remote "Add Chart",{:url => {:action => "add_chart_for_chartable", :chartable_type => "building",:chartable_id => building.id},
:update => 'other_link', #really not sure about this part as I only want to update the Chart Count in the other link
}
%>
简单地替换链接中的 HTML 就很容易了,但我不想“破坏”它的功能。有任何想法吗?
谢谢。