Last active
December 12, 2019 17:11
-
-
Save gdomingu/c9412447b9d00a449fc28cec9e7b1c01 to your computer and use it in GitHub Desktop.
A handler for doing special things for deprecation notices in rails 5.0
This file contains hidden or 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
ActiveSupport::Deprecation.behavior = ActiveSupport::Deprecation.behavior + [->(message, callstack) { | |
if message.include?("Returning `false` in Active Record and Active Model callbacks will not implicitly halt a callback chain in Rails 5.1. To explicitly halt the callback chain, please use `throw :abort` instead.") | |
DeprecationLogger.log("Callback returned false", { callstack: callstack}) | |
end | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment