Module: TouchRecords

Defined in:
backend/app/model/mixins/touch_records.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

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

#deleteObject



27
28
29
30
31
# File 'backend/app/model/mixins/touch_records.rb', line 27

def delete
  self.class.touch(self) do
    super
  end
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



33
34
35
36
37
# File 'backend/app/model/mixins/touch_records.rb', line 33

def update_from_json(json, opts = {}, apply_nested_records = true)
  result = super
  self.class.touch(self)
  result
end