-
-
Save ktopping/3939627 to your computer and use it in GitHub Desktop.
how to selectively ignore rails / activesupport::depreciation messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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