<% if !@product.errors.any? %> $("#notice").html("<div class='alert alert-success' ><p> <%= flash[:success] %> </p></div>"); <% end %> $('#dialog').modal('hide');