Module: TouchRecords
- Included in:
- AgentFunction, AgentOccupation, AgentPlace, AgentResource, AgentTopic, ArchivalObject, DigitalObjectComponent, TopContainer
- Defined in:
- backend/app/model/mixins/touch_records.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
NOTE: this does not apply to _rlshp records which update related records system_mtime via the trigger_reindex_of_dependants path, i.e.
Instance Method Summary collapse
-
#delete ⇒ Object
-
#set_parent_and_position(*) ⇒ Object
-
#set_root(*) ⇒ Object
-
#update_from_json(json, opts = {}, apply_nested_records = true) ⇒ Object
Class Method Details
.included(base) ⇒ Object
NOTE: this does not apply to _rlshp records which update related records system_mtime via the trigger_reindex_of_dependants path, i.e. for agents and subjects et al. using defined relationships
13 14 15 |
# File 'backend/app/model/mixins/touch_records.rb', line 13 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#delete ⇒ Object
27 28 29 30 |
# File 'backend/app/model/mixins/touch_records.rb', line 27 def delete self.class.touch(self) super end |
#set_parent_and_position(*) ⇒ Object
17 18 19 20 |
# File 'backend/app/model/mixins/touch_records.rb', line 17 def set_parent_and_position(*) super self.class.touch(self) end |
#set_root(*) ⇒ Object
22 23 24 25 |
# File 'backend/app/model/mixins/touch_records.rb', line 22 def set_root(*) super self.class.touch(self) end |
#update_from_json(json, opts = {}, apply_nested_records = true) ⇒ Object
32 33 34 35 36 |
# File 'backend/app/model/mixins/touch_records.rb', line 32 def update_from_json(json, opts = {}, apply_nested_records = true) result = super self.class.touch(self) result end |