You can do it like this:
# index.html.erb
<table>
<tbody>
<% @exercises.each do |exercise| %>
<tr id="exercise_<%= exercise.id %>">
<td><%= exercise.name %></td>
# etc...
</tr>
<% end %>
</tbody>
</table>
# update action in controller:
def update
@exercise = Exercise.where(id: params[:id]).first
@exercise.update_attributes(params[:whatever])
# etc ...
# update.js.erb
console.log('Updated');
$('#dialog-form').dialog('close');
$('#dialog-form').remove();
$('table tr#exercise_<%= @exercise.id %>').replaceWith('<%= escape_javascript(render(@exercise)) %>');
Hope this helps! Feel free to ask any question about this