6 lines
285 B
Text
6 lines
285 B
Text
<% 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 %>
|