summaryrefslogtreecommitdiff
path: root/app/controllers/admin/admin_controller.rb
blob: 51bd31405c0b5b55b991a48e3e8f8a834e528d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
module Admin
  class AdminController < ApplicationController
    before_action :restrict_access!

    private

    def restrict_access!
      redirect_to root_path unless current_user.try(:admin?)
    end
  end
end