Class: Identifier::Unknown
- Inherits:
-
Identifier
- Object
- ActiveRecord::Base
- ApplicationRecord
- Identifier
- Identifier::Unknown
- Defined in:
- app/models/identifier/unknown.rb
Overview
The identifier whose origin and scope is unknown (i.e. can not be deduced after effort).
Instantiating this class asserts that a namespace can not be determined.
Constant Summary
Constants included from Shared::DualAnnotator
Shared::DualAnnotator::ALWAYS_COMMUNITY
Instance Attribute Summary collapse
-
#identifier ⇒ String
The verbatim value of this identifier.
Attributes inherited from Identifier
#cached, #cached_numeric_identifier, #identifier_object_id, #namespace_id, #project_id, #type
Instance Method Summary collapse
- #set_cached ⇒ Object protected
Methods inherited from Identifier
#build_cached, #build_cached_numeric_identifier, #is_global?, #is_local?, prototype_identifier, #type_name
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::Labels
Methods included from Housekeeping
#has_polymorphic_relationship?
Methods included from Shared::PolymorphicAnnotator
#annotated_object_is_persisted?
Methods inherited from ApplicationRecord
Instance Attribute Details
#identifier ⇒ String
The verbatim value of this identifier.
8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/identifier/unknown.rb', line 8 class Identifier::Unknown < Identifier validates_uniqueness_of :identifier, scope: [:project_id] protected def set_cached update_column(:cached, identifier) end end |
Instance Method Details
#set_cached ⇒ Object (protected)
14 15 16 |
# File 'app/models/identifier/unknown.rb', line 14 def set_cached update_column(:cached, identifier) end |