Permalink
Browse files

Use 'reverse-ordered' jquery's replaceAll();

  • Loading branch information...
1 parent 0fc3461 commit b505939a187ca86c6986b4cbab69b78a96101370 @denispeplin committed Apr 17, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/views/products/update.js.erb
@@ -1,6 +1,6 @@
<% if @product.valid? %>
$('#modal_<%= dom_id(@product) %>').modal('hide');
- $('tr#<%= dom_id(@product) %>').html("<%= escape_javascript(render @product) %>");
+ $("<%= escape_javascript(render @product) %>").replaceAll('tr#<%= dom_id(@product) %>');
$('tr#<%= dom_id(@product) %>').hide().show('slow');
<% else %>
$('input#product_name').effect('highlight', { color: 'red' });

0 comments on commit b505939

Please sign in to comment.