Sha256: ef3915dabfbf0ea9b3073252f892f1adb91dbf299525b78a6cbf41a3b81add8f

Contents?: true

Size: 1.16 KB

Versions: 25

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true
module Sipity
  # When a Sipity::Action is taken, each Sipity::Method is loaded and
  # it's service_name is instantiated and called (all of this done via
  # the Hyrax::Workflow::ActionTakenService).
  #
  # @note
  #   When a user takes the "deposit a work" action, call the "Lookup
  #   the corresponding Reviewer for the given Department and assign
  #   that person or group the Reviewer role for the given work (but
  #   not all of the works of the workflow)"
  #
  # This is responsible for mapping the Sipity::WorkflowAction to an object that
  # responds to .call
  #
  # We store, in the database, the 'service_name'. It is the name of a constant
  # in the object space (e.g. we constantize the given service_name). The
  # resolving service object should specify that `it_behaves_like "a Hyrax workflow method"`
  #
  # @see ./lib/hyrax/specs/shared_specs/workflow_method.rb
  # @see Sipity::WorkflowAction
  # @see Hyrax::Workflow::ActionTakenService to see how this is used.
  class Method < ActiveRecord::Base
    self.table_name = 'sipity_workflow_methods'
    belongs_to :workflow_action, class_name: 'Sipity::WorkflowAction'
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/models/sipity/method.rb
hyrax-5.0.0 app/models/sipity/method.rb
hyrax-5.0.0.rc3 app/models/sipity/method.rb
hyrax-5.0.0.rc2 app/models/sipity/method.rb
hyrax-5.0.0.rc1 app/models/sipity/method.rb
hyrax-3.6.0 app/models/sipity/method.rb
hyrax-4.0.0 app/models/sipity/method.rb
hyrax-4.0.0.rc3 app/models/sipity/method.rb
hyrax-4.0.0.rc2 app/models/sipity/method.rb
hyrax-4.0.0.rc1 app/models/sipity/method.rb
hyrax-3.5.0 app/models/sipity/method.rb
hyrax-4.0.0.beta2 app/models/sipity/method.rb
hyrax-3.4.2 app/models/sipity/method.rb
hyrax-4.0.0.beta1 app/models/sipity/method.rb
hyrax-3.4.1 app/models/sipity/method.rb
hyrax-3.4.0 app/models/sipity/method.rb
hyrax-3.3.0 app/models/sipity/method.rb
hyrax-3.2.0 app/models/sipity/method.rb
hyrax-3.1.0 app/models/sipity/method.rb
hyrax-3.0.2 app/models/sipity/method.rb