tap/app/views/products/update.js.erb

7 lines
285 B
Text
Raw Normal View History

2015-04-03 23:56:13 +02:00
<% if @product.errors.any? %>
$('#products-errors').html("<%= j render 'errors', object: @product %>")
<% else %>
$('#products-errors').html('')
$("#products_row_<%= dom_id(@product) %>").replaceWith("<%= j render 'products_list/product_row', product: @product %>");
<% end %>