OSDN Git Service

t#31078:add ImportResult
[pettanr/pettanr.git] / app / controllers / provider_statuses_controller.rb
index ab5c043..d1b321e 100644 (file)
@@ -69,30 +69,30 @@ class ProviderStatusesController < ApplicationController
   def licenses_import
     @provider_status = ProviderStatus.show(params[:id], @admin)
     raise ActiveRecord::Forbidden if @provider_status.status == 0
-    @failures = @provider_status.licenses_import params[:date]
+    @import_result = @provider_status.licenses_import params[:date]
     respond_to do |format|
       format.html # show.html.erb
-      format.json { render :json => @failures.to_json() }
+      format.json { render :json => @import_result.to_json() }
     end
   end
   
   def artists_import
     @provider_status = ProviderStatus.show(params[:id], @admin)
     raise ActiveRecord::Forbidden if @provider_status.status == 0
-    @failures = @provider_status.artists_import params[:date]
+    @import_result = @provider_status.artists_import params[:date]
     respond_to do |format|
       format.html # show.html.erb
-      format.json { render :json => @failures.to_json() }
+      format.json { render :json => @import_result.to_json() }
     end
   end
   
   def original_pictures_import
     @provider_status = ProviderStatus.show(params[:id], @admin)
     raise ActiveRecord::Forbidden if @provider_status.status == 0
-    @failures = @provider_status.original_pictures_import params[:date]
+    @import_result = @provider_status.original_pictures_import params[:date]
     respond_to do |format|
       format.html # show.html.erb
-      format.json { render :json => @failures.to_json() }
+      format.json { render :json => @import_result.to_json() }
     end
   end