module ActiveSupport::Deprecation::Reporting
def silence
end
ActiveSupport::Deprecation.warn('something broke!')
ActiveSupport::Deprecation.silence do
# => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)"
ActiveSupport::Deprecation.warn('something broke!')
Silence deprecation warnings within the block.
def silence old_silenced, @silenced = @silenced, true yield ensure @silenced = old_silenced end