two_factor_authentications_controller.rb 318 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. module Admin
  3. class TwoFactorAuthenticationsController < BaseController
  4. before_action :set_user
  5. def destroy
  6. @user.disable_two_factor!
  7. redirect_to admin_accounts_path
  8. end
  9. private
  10. def set_user
  11. @user = User.find(params[:user_id])
  12. end
  13. end
  14. end