app/controllers/fiona7/release_controller.rb in infopark_fiona7-1.1.0.0.0 vs app/controllers/fiona7/release_controller.rb in infopark_fiona7-1.1.0.0.1

- old
+ new

@@ -1,17 +1,18 @@ module Fiona7 class ReleaseController < ActionController::Base def release obj_ids = params[:objs] + objs = WriteObj.find(obj_ids) comment = params[:comment] errors = [] if !obj_ids.empty? - main_obj = obj_ids.shift + main_obj = objs.shift carefully_release(errors, main_obj, comment) - obj_ids.each do |other_obj| + objs.each do |other_obj| carefully_release(errors, other_obj) end end render json: {} @@ -49,10 +50,10 @@ #complex_object.binaries.each do |widget_obj| # widget_obj.take # widget_obj.release!(comment) #end rescue => e - Rails.logger.error("Error occured when releasing #{@obj.id}: unable to release Object with ID #{obj.id} (#{obj.path} because: #{e.inspect}") + Rails.logger.error("Error occured when releasing #{obj.id}: unable to release Object with ID #{obj.id} (#{obj.path} because: #{e.inspect}") # TODO: translate error = "Unable to release Object with ID #{obj.id} because: #{e.message}" errors << error end