about summary refs log tree commit diff
path: root/app/controllers/admin/resets_controller.rb
blob: 7962b7a58c6d4c8380ec684ae17791cd49ac1777 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module Admin
  class ResetsController < BaseController
    before_action :set_user

    def create
      authorize @user, :reset_password?
      @user.reset_password!
      log_action :reset_password, @user
      redirect_to admin_account_path(@user.account_id)
    end
  end
end