From 76cd1ca08dc31babd7e9e527a8a9c86321ed905a Mon Sep 17 00:00:00 2001 From: Adam Hawkins Date: Sun, 15 Apr 2012 16:21:06 +0300 Subject: Add a "silence" behavior to completely turn off deprecation warnings. --- activesupport/lib/active_support/deprecation/behaviors.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index 94f8d7133e..8d92c50679 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -41,8 +41,9 @@ module ActiveSupport }, :notify => Proc.new { |message, callstack| ActiveSupport::Notifications.instrument("deprecation.rails", - :message => message, :callstack => callstack) - } + :message => message, :callstack => callstack) + }, + :silence => Proc.new { |message, callstack| } } end end -- cgit v1.2.3