Class: SupplejackApi::ApiConcept::ConceptFragment
- Inherits:
-
Fragment
- Object
- Fragment
- SupplejackApi::ApiConcept::ConceptFragment
show all
- Defined in:
- app/models/supplejack_api/api_concept/concept_fragment.rb
Constant Summary
Constants inherited
from Fragment
Fragment::MONGOID_TYPE_NAMES
Class Method Summary
collapse
Methods inherited from Fragment
build_mongoid_schema, #clear_attributes, #primary?, #update_from_harvest
Class Method Details
.mutable_fields ⇒ Object
22
23
24
25
26
27
28
|
# File 'app/models/supplejack_api/api_concept/concept_fragment.rb', line 22
def self.mutable_fields
@@mutable_fields ||= begin
immutable_fields = %w(_id _type source_id created_at updated_at)
mutable_fields = fields.keys - immutable_fields
Hash[mutable_fields.map { |name| [name, fields[name].type] }]
end.freeze
end
|
.schema_class ⇒ Object
16
17
18
|
# File 'app/models/supplejack_api/api_concept/concept_fragment.rb', line 16
def self.schema_class
ConceptSchema
end
|