Sha256: 49660c16b13df4ff424a6aa75d509192a113de3a4dd18a4db31915d6a08ce519

Contents?: true

Size: 532 Bytes

Versions: 5

Compression:

Stored size: 532 Bytes

Contents

module CurationConcerns
  module Publishable
    extend ActiveSupport::Concern

    included do
      # This holds the workflow state
      property :state, predicate: Vocab::FedoraResourceStatus.objState, multiple: false

      class_attribute :state_workflow, instance_writer: false
      self.state_workflow = StateWorkflow
    end

    # Override this method if you have some critera by which records should not
    # display in the search results.
    def suppressed?
      state_workflow.new(state).pending?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
curation_concerns-1.6.3 app/models/concerns/curation_concerns/publishable.rb
curation_concerns-1.6.2 app/models/concerns/curation_concerns/publishable.rb
curation_concerns-1.6.1 app/models/concerns/curation_concerns/publishable.rb
curation_concerns-1.6.0 app/models/concerns/curation_concerns/publishable.rb
curation_concerns-1.5.0 app/models/concerns/curation_concerns/publishable.rb