confirmations_controller.rb 318 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. module Admin
  3. class ConfirmationsController < BaseController
  4. def create
  5. account_user.confirm
  6. redirect_to admin_accounts_path
  7. end
  8. private
  9. def account_user
  10. Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
  11. end
  12. end
  13. end