<% if !@product.errors.any? %> $("#notice").html("

<%= flash[:success] %>

"); <% end %> $('#dialog').modal('hide');