2017-04-10 21:27:03 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class BaseController < ApplicationController
|
2017-11-11 20:23:33 +01:00
|
|
|
include Authorization
|
2017-11-24 02:05:53 +01:00
|
|
|
include AccountableConcern
|
2017-11-11 20:23:33 +01:00
|
|
|
|
2017-11-21 07:13:37 +01:00
|
|
|
layout 'admin'
|
|
|
|
|
2017-11-11 20:23:33 +01:00
|
|
|
before_action :require_staff!
|
2017-11-21 07:13:37 +01:00
|
|
|
before_action :set_pack
|
2018-10-25 00:10:01 +02:00
|
|
|
before_action :set_body_classes
|
2017-04-10 21:27:03 +02:00
|
|
|
|
2018-10-25 00:10:01 +02:00
|
|
|
private
|
|
|
|
|
|
|
|
def set_body_classes
|
|
|
|
@body_classes = 'admin'
|
|
|
|
end
|
2017-04-10 21:27:03 +02:00
|
|
|
|
2017-11-21 07:13:37 +01:00
|
|
|
def set_pack
|
|
|
|
use_pack 'admin'
|
|
|
|
end
|
2017-04-10 21:27:03 +02:00
|
|
|
end
|
|
|
|
end
|