0
是否有一種更新「link_to_remote」內部文本並保持鏈接功能的高質量方法?基本上我有兩個環節:(Rails)如何在不斷開鏈接的情況下替換「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,但我不想要「休息「它的功能。有任何想法嗎?
謝謝。