Skip to content

Instantly share code, notes, and snippets.

@davetapley
Last active November 16, 2015 16:45
Show Gist options
  • Select an option

  • Save davetapley/b8e732fa47f7e731e66d to your computer and use it in GitHub Desktop.

Select an option

Save davetapley/b8e732fa47f7e731e66d to your computer and use it in GitHub Desktop.
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