Existe-t-il un moyen efficace de mettre à jour le texte dans un "link_to_remote" et de laisser le lien fonctionnel? Fondamentalement, j'ai deux liens:(Rails) Comment remplacer le texte d'un "link_to_remote" sans rompre le lien?
<%= 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',
}
%>
... et ...
<%= 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
}
%>
Il serait assez facile de remplacer simplement le code HTML à l'intérieur du lien, mais je ne veux pas « casser "sa fonctionnalité. Des idées?
Merci.