Class: PreparationType
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- PreparationType
- 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
-
#definition ⇒ String
A definition describing the preparation.
-
#name ⇒ String
The name of the preparation.
Attributes included from Housekeeping::Users
Method Summary
Methods included from Shared::IsData
#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar
Methods included from Shared::HasPapertrail
#attribute_updated, #attribute_updater
Methods included from Shared::Tags
#reject_tags, #tag_with, #tagged?, #tagged_with?
Methods included from Housekeeping::Users
#set_created_by_id, #set_updated_by_id
Methods inherited from ApplicationRecord
Instance Attribute Details
#definition ⇒ String
Returns a definition describing the preparation.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/preparation_type.rb', line 12 class PreparationType < ApplicationRecord include Housekeeping::Users include Housekeeping::Timestamps include Shared::Tags include Shared::SharedAcrossProjects include Shared::HasPapertrail include Shared::IsData has_many :collection_objects, dependent: :restrict_with_error, inverse_of: :preparation_type validates_presence_of :name, :definition validates_uniqueness_of :name validates_uniqueness_of :definition end |
#name ⇒ String
Returns the name of the preparation.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/preparation_type.rb', line 12 class PreparationType < ApplicationRecord include Housekeeping::Users include Housekeeping::Timestamps include Shared::Tags include Shared::SharedAcrossProjects include Shared::HasPapertrail include Shared::IsData has_many :collection_objects, dependent: :restrict_with_error, inverse_of: :preparation_type validates_presence_of :name, :definition validates_uniqueness_of :name validates_uniqueness_of :definition end |