Sha256: ff64db7c7d5f7841f62c1e1df5720592338c278f048b8d674e8d38bcd782537b

Contents?: true

Size: 561 Bytes

Versions: 36

Compression:

Stored size: 561 Bytes

Contents

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)
    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)
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/models/hyrax/batch_create_operation.rb
hyrax-2.9.5 app/models/hyrax/batch_create_operation.rb
hyrax-2.9.4 app/models/hyrax/batch_create_operation.rb
hyrax-2.9.3 app/models/hyrax/batch_create_operation.rb
hyrax-2.9.2 app/models/hyrax/batch_create_operation.rb
hyrax-2.9.1 app/models/hyrax/batch_create_operation.rb
hyrax-2.9.0 app/models/hyrax/batch_create_operation.rb
hyrax-2.8.0 app/models/hyrax/batch_create_operation.rb
hyrax-2.7.2 app/models/hyrax/batch_create_operation.rb
hyrax-2.7.1 app/models/hyrax/batch_create_operation.rb
hyrax-2.7.0 app/models/hyrax/batch_create_operation.rb
hyrax-2.6.0 app/models/hyrax/batch_create_operation.rb
hyrax-3.0.0.pre.rc1 app/models/hyrax/batch_create_operation.rb
hyrax-3.0.0.pre.beta3 app/models/hyrax/batch_create_operation.rb
hyrax-2.5.1 app/models/hyrax/batch_create_operation.rb
hyrax-2.5.0 app/models/hyrax/batch_create_operation.rb
hyrax-3.0.0.pre.beta2 app/models/hyrax/batch_create_operation.rb
hyrax-2.4.1 app/models/hyrax/batch_create_operation.rb
hyrax-3.0.0.pre.beta1 app/models/hyrax/batch_create_operation.rb
hyrax-2.4.0 app/models/hyrax/batch_create_operation.rb