Class: PreparationType

Inherits:
ApplicationRecord show all
Includes:
Housekeeping::Timestamps, Housekeeping::Users, Shared::HasPapertrail, Shared::IsData, Shared::SharedAcrossProjects, Shared::Tags
Defined in:
app/models/preparation_type.rb

Overview

A PreparationType describes how a collection object was prepared for preservation in a collection. At present we're building a shared controlled vocabulary that we may ultimately try and turn into an ontology.

Instance Attribute Summary (collapse)

Attributes included from Housekeeping::Users

#by

Method Summary

Methods included from Housekeeping::Timestamps

#data_breakdown_for_chartkick_recent

Methods included from Housekeeping::Users

#set_created_by_id, #set_updated_by_id

Methods included from ActiverecordUtilities

#trim_attributes

Instance Attribute Details

- (String) definition

Returns a definition describing the preparation

Returns:

  • (String)

    a definition describing the preparation



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/preparation_type.rb', line 12

class PreparationType < ApplicationRecord
  include Housekeeping::Users
  include Housekeeping::Timestamps
  include Shared::IsData
  include Shared::Tags
  include Shared::SharedAcrossProjects
  include Shared::HasPapertrail

  has_many :collection_objects, dependent: :restrict_with_error
  validates_presence_of :name, :definition

end

- (String) name

Returns the name of the preparation

Returns:

  • (String)

    the name of the preparation



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/preparation_type.rb', line 12

class PreparationType < ApplicationRecord
  include Housekeeping::Users
  include Housekeeping::Timestamps
  include Shared::IsData
  include Shared::Tags
  include Shared::SharedAcrossProjects
  include Shared::HasPapertrail

  has_many :collection_objects, dependent: :restrict_with_error
  validates_presence_of :name, :definition

end