15 lines
236 B
Ruby
15 lines
236 B
Ruby
|
class AdminController < ApplicationController
|
||
|
layout "admin"
|
||
|
|
||
|
before_action :authenticate_user_as_admin
|
||
|
|
||
|
def index
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def authenticate_user_as_admin
|
||
|
head :forbidden unless Current.user&.admin?
|
||
|
end
|
||
|
end
|