show error messages on bur failures

This commit is contained in:
r888888888
2016-06-15 13:03:29 -07:00
parent 388b2ed6e2
commit 55494c30bb
2 changed files with 5 additions and 2 deletions

View File

@@ -32,7 +32,6 @@ class BulkUpdateRequestsController < ApplicationController
def approve
@bulk_update_request.approve!(CurrentUser.user.id)
flash[:notice] = "Bulk update request approved"
respond_with(@bulk_update_request, :location => bulk_update_requests_path)
end

View File

@@ -1 +1,5 @@
$("#request-status-for-<%= @bulk_update_request.id %>").html("queued");
<% if @bulk_update_request.errors.any? %>
Danbooru.error(<%= j @bulk_update_request.errors.full_messages.join(',') %>);
<% else %>
$("#request-status-for-<%= @bulk_update_request.id %>").html("queued");
<% end %>