plataformatec/devise — pull request #2592 by dgalarza (2013-11-06 21:17:12+00:00)
Title: ActiveSupport::Notifications integration

Hello,

I've recently been working on a project where we are looking to track different metrics such as when a user requests a password reset token or when they end up using the token to reset their password. I was thinking it might be nice to be able to subscribe to events using ActiveSupport::Notifications with Devise. I wanted to gauge how useful everyone thought this would be before embarking on it.

I figured notifications could even be broken up by the modules that may call them. For example recoverable may have the following notifications that could be subscribed to:

```ruby
ActiveSupport::Notifications.subscribe 'send_reset_password_instructions.recoverable.devise' do |*args|
...
end

ActiveSupport::Notifications.subscribe 'reset_password.recoverable.devise' do |*args|
...
end
```