Skip to content

Instantly share code, notes, and snippets.

@dukedave dukedave/warn_legacy.rb
Last active Nov 16, 2015

Embed
What would you like to do?
Notify Sentry when legacy attributes are used
LEGACY_PROCESSOR_ATTRS.each do |*attr|
define_method(attr) do
Raven.capture_message "Read legacy attribute #{attr}", level: 'warning'
read_attribute attr, *opts
end
define_method("#{attr}=") do |*opts|
Raven.capture_message "Wrote legacy attribute #{attr}", level: 'warning'
write_attribute attr, *opts
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.