Module: RailsOnboarding::AdminAuthorization
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/rails_onboarding/admin_authorization.rb
Overview
Admin gate shared by the Admin dashboard controllers and by the standalone AbTests/Templates controllers, which are admin-only but live outside the Admin namespace. Provides the authentication/authorization before_action targets plus the handler methods used to turn a denial into a friendly redirect or error response.
This concern intentionally does NOT declare any rescue_from handlers of
its own. Handler methods live here, but each controller declares its own
rescue_from ..., with: so the registration order stays under that
controller's control - rescue_from resolves most-recently-registered
first, so a generic StandardError handler must be registered before the
specific ones or it swallows them.
Defined Under Namespace
Classes: UnauthorizedError