summaryrefslogtreecommitdiff
path: root/app/controllers/admin/application_controller.rb
blob: 56e24386463db3a95e794faf0ed9ed83df635336 (plain)
1
2
3
4
5
6
7
8
9
10
11
# Provides a base class for Admin controllers to subclass
#
# Automatically sets the layout and ensures an administrator is logged in
class Admin::ApplicationController < ApplicationController
  before_action :authenticate_admin!
  layout 'admin'

  def authenticate_admin!
    return render_404 unless current_user.is_admin?
  end
end