base_controller.rb 461 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. class Settings::BaseController < ApplicationController
  3. layout 'admin'
  4. before_action :authenticate_user!
  5. before_action :set_body_classes
  6. before_action :set_cache_headers
  7. private
  8. def set_body_classes
  9. @body_classes = 'admin'
  10. end
  11. def set_cache_headers
  12. response.cache_control.replace(private: true, no_store: true)
  13. end
  14. def require_not_suspended!
  15. forbidden if current_account.unavailable?
  16. end
  17. end