Module: ActiveModelCachers::Hook::OnModelDelete::ClassMethods

Defined in:
lib/active_model_cachers/hook/on_model_delete.rb

Instance Method Summary collapse

Instance Method Details

#delete(id, model = nil) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/active_model_cachers/hook/on_model_delete.rb', line 15

def delete(id, model = nil)
  ActiveModelCachers::ActiveRecord::Extension.global_callbacks.before_delete1.exec(self, self, id, model)
  ActiveModelCachers::ActiveRecord::Extension.global_callbacks.before_delete2.exec(self, self, id, model)

  result = super(id)

  ActiveModelCachers::ActiveRecord::Extension.global_callbacks.after_delete.exec(self, self, id, model)
  return result
end