Module: CurationConcerns::WorkBehavior

Extended by:
ActiveSupport::Concern
Includes:
HasRepresentative, HumanReadableType, Noid, Permissions, Serializers, WithFileSets, Hydra::AccessControls::Embargoable, Hydra::WithDepositor, Hydra::Works::WorkBehavior, Solrizer::Common
Defined in:
app/models/concerns/curation_concerns/work_behavior.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from WithFileSets

#before_destroy_cleanup_file_sets, #copy_visibility_to_files, #file_set_ids

Methods included from Permissions::Readable

#private?, #public?, #registered?

Methods included from Permissions::Writable

#paranoid_edit_permissions, #paranoid_permissions

Methods included from Noid

#assign_id, #to_param

Methods included from HumanReadableType

#human_readable_type, #to_solr

Instance Method Details

#can_be_member_of_collection?(_collection) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
# File 'app/models/concerns/curation_concerns/work_behavior.rb', line 41

def can_be_member_of_collection?(_collection)
  true
end

#to_partial_pathObject

Returns a string identifying the path associated with the object. ActionPack uses this to find a suitable partial to represent the object.



37
38
39
# File 'app/models/concerns/curation_concerns/work_behavior.rb', line 37

def to_partial_path
  "curation_concerns/#{super}"
end

#to_sObject



26
27
28
29
30
31
32
33
34
# File 'app/models/concerns/curation_concerns/work_behavior.rb', line 26

def to_s
  if title.present?
    Array(title).join(' | ')
  elsif label.present?
    Array(label).join(' | ')
  else
    'No Title'
  end
end