You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
378 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class ConfirmationsController < BaseController
  4. before_action :set_user
  5. def create
  6. authorize @user, :confirm?
  7. @user.confirm!
  8. redirect_to admin_accounts_path
  9. end
  10. private
  11. def set_user
  12. @user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
  13. end
  14. end
  15. end