Class: Copyable::ModelHooks

Inherits:
Object
  • Object
show all
Defined in:
lib/copyable/model_hooks.rb

Class Method Summary collapse

Class Method Details

.disable!(klass) ⇒ Object

Disabling callbacks automatically disables any registered observers, since observers use the callback mechanism internally.



7
8
9
# File 'lib/copyable/model_hooks.rb', line 7

def self.disable!(klass)
  disable_all_callbacks(klass)
end

.reenable!(klass) ⇒ Object



11
12
13
# File 'lib/copyable/model_hooks.rb', line 11

def self.reenable!(klass)
  reenable_all_callbacks(klass)
end