Skip to content

Instantly share code, notes, and snippets.

@ktopping
Forked from timruffles/ignore_depreciations.rb
Created October 23, 2012 15:55
Show Gist options
  • Save ktopping/3939627 to your computer and use it in GitHub Desktop.
Save ktopping/3939627 to your computer and use it in GitHub Desktop.
how to selectively ignore rails / activesupport::depreciation messages
if Rails.env.production?
# silence the deprecation warnings on Heroku
# Thanks to: https://gist.github.com/2237443
ActiveSupport::Deprecation.behavior = lambda do |msg, stack|
unless /vendor\/plugins/ =~ msg
ActiveSupport::Deprecation::DEFAULT_BEHAVIORS[:stderr].call(msg,stack) # whichever handlers you want - this is the default
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment