Skip to content

Instantly share code, notes, and snippets.

View joelbriggs's full-sized avatar

Joel joelbriggs

  • Earth
View GitHub Profile
@joelbriggs
joelbriggs / stripe_account_controller.rb
Created February 2, 2021 21:53
Part of a Stripe Subscription solution
module Manager
# Controller for managing account
class AccountController < ManagerController
include Manager::AccountHelper
skip_before_action :redirect_deactivated_account_to_reactivation
before_action :admin_required
def admin_required
redirect_to home_path if current_user.role == 'user'
end