class PasswordsController < Devise::PasswordsController
  def create
    self.resource = resource_class.send_reset_password_instructions(params[resource_name])
    flash.now[:alert] = t(:reset_notification)
    Statsd.new(::STATSD_HOST).increment(
      "#{::STATSD_PREFIX}.users.password_reset_request"
    )
    render action: 'new'
  end
end

class PasswordsController < Devise::PasswordsController
  before_filter :record_password_reset_request, only: :create

  private
    def record_password_reset_request
      Statsd.new(::STATSD_HOST).increment(
        "#{::STATSD_PREFIX}.users.password_reset_request"
      )
    end
end

Fix broken password reset controller tests
Fix broken password reset controller tests

Until recently, this code was never actually running. It appears
that wiring it up broke some functionality.

Further to that, the duplicated Devise code didn't match. I
decided to avoid copying code entirely, and instead use a before_filter.
