Last active
January 3, 2023 18:31
-
-
Save todd/a80bc640e86f42e20867 to your computer and use it in GitHub Desktop.
Print All Rails Deprecation Warnings to File
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
# test.rb | |
config.active_support.deprecation = -> (message, callstack) { | |
File.open("#{Rails.root}/deprecations", "a") do |f| | |
f.write message | |
f.write callstack.join("\n ") | |
f.write "\n" | |
end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment