Last active
November 16, 2015 16:45
-
-
Save davetapley/b8e732fa47f7e731e66d to your computer and use it in GitHub Desktop.
Notify Sentry when legacy attributes are used
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
| 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