Sha256: 34f6693e39a71aae153c7941adc4c4b7abc5d0fa562b0ef8c01e53ffc00d7a99

Contents?: true

Size: 617 Bytes

Versions: 28

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  class BatchCreateOperation < Operation
    set_callback :success, :after, :batch_success_message
    set_callback :failure, :after, :batch_failure_message

    def batch_success_message
      return unless Hyrax.config.callback.set?(:after_batch_create_success)
      Hyrax.config.callback.run(:after_batch_create_success, user, warn: false)
    end

    def batch_failure_message
      return unless Hyrax.config.callback.set?(:after_batch_create_failure)
      Hyrax.config.callback.run(:after_batch_create_failure, user, rollup_messages, warn: false)
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
hyrax-5.0.4 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.3 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.2 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.1 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.0 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.0.rc3 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.0.rc2 app/models/hyrax/batch_create_operation.rb
hyrax-5.0.0.rc1 app/models/hyrax/batch_create_operation.rb
hyrax-3.6.0 app/models/hyrax/batch_create_operation.rb
hyrax-4.0.0 app/models/hyrax/batch_create_operation.rb
hyrax-4.0.0.rc3 app/models/hyrax/batch_create_operation.rb
hyrax-4.0.0.rc2 app/models/hyrax/batch_create_operation.rb
hyrax-4.0.0.rc1 app/models/hyrax/batch_create_operation.rb
hyrax-3.5.0 app/models/hyrax/batch_create_operation.rb
hyrax-4.0.0.beta2 app/models/hyrax/batch_create_operation.rb
hyrax-3.4.2 app/models/hyrax/batch_create_operation.rb
hyrax-4.0.0.beta1 app/models/hyrax/batch_create_operation.rb
hyrax-3.4.1 app/models/hyrax/batch_create_operation.rb
hyrax-3.4.0 app/models/hyrax/batch_create_operation.rb
hyrax-3.3.0 app/models/hyrax/batch_create_operation.rb