Skip to content

Instantly share code, notes, and snippets.

@todd
Last active January 3, 2023 18:31
Show Gist options
  • Save todd/a80bc640e86f42e20867 to your computer and use it in GitHub Desktop.
Save todd/a80bc640e86f42e20867 to your computer and use it in GitHub Desktop.
Print All Rails Deprecation Warnings to File
# 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