Module: Waitmate::ControllerConcern
- Extended by:
- ActiveSupport::Concern
- Includes:
- TargetValidation
- Defined in:
- lib/waitmate/controller_concern.rb
Overview
Provides the wait_room controller macro. Host controllers include this
concern and declare which actions are capacity-gated:
class CheckoutsController < ApplicationController
include Waitmate::ControllerConcern
wait_room :create, max_concurrent: 500
end
The macro is transport-agnostic: it performs capacity-check → redirect → return-verify without knowing whether the waiting room uses polling, ActionCable, or full-page reloads.