You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
521 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class BaseController < ApplicationController
  4. include Authorization
  5. include AccountableConcern
  6. layout 'admin'
  7. before_action :require_staff!
  8. before_action :set_pack
  9. before_action :set_body_classes
  10. private
  11. def set_body_classes
  12. @body_classes = 'admin'
  13. end
  14. def set_pack
  15. use_pack 'admin'
  16. end
  17. def set_user
  18. @user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
  19. end
  20. end
  21. end