Created
January 23, 2013 21:05
-
-
Save reinh/4613267 to your computer and use it in GitHub Desktop.
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
module StatsdLoginNotifier | |
def authenticate(name, password) | |
result = super | |
Statsd.new.count result ? 'login.success' : 'login.failure' | |
return result | |
end | |
end | |
class Session | |
prepend StatsdLoginNotifier | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment