Module: ActiveRecord::Suppressor::ClassMethods

Defined in:
lib/active_record/suppressor.rb

Instance Method Summary collapse

Instance Method Details

#suppress(&block) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/active_record/suppressor.rb', line 42

def suppress(&block)
  previous_state = Suppressor.registry[name]
  Suppressor.registry[name] = true
  yield
ensure
  Suppressor.registry[name] = previous_state
end