Module: Plutonium::Wizard::Controller
- Extended by:
- ActiveSupport::Concern
- Includes:
- Core::Controller, Driving
- Included in:
- BaseController
- Defined in:
- lib/plutonium/wizard/controller.rb
Overview
The standalone portal-hosted controller concern for portal-level wizards
registered with register_wizard (§5.2). It is mixed into a portal-
namespaced controller (see Routing::WizardRegistration), so it
inherits the portal's auth, tenant scoping entity, layout, and Phlex
rendering exactly like a resource controller.
All runner-driving logic lives in Driving (shared with
the resource-mounted Resource::Controllers::WizardActions). This
concern only adapts that logic to the standalone surface: the show/update
actions, the wizard class carried as a route default, no anchor (portal-level
wizards are non-anchored — anchored wizards mount on the resource controller),
and the per-step URL built from the named route helper register_wizard draws.
Identity (§4): a guest (anonymous) run's per-run id lives in the Rails
session, namespaced per wizard (no cookie, no TTL); it is cleared on
completion and auto-cleared on login/logout (Rodauth reset_session). An
authenticated repeatable run carries its per-run id in the URL :token
segment, guarded by owner-scoping; neither crosses the auth boundary
mid-flow (§4.5).
Constant Summary
Constants included from Driving
Driving::SESSION_TOKENS_KEY, Driving::WIZARD_RETURN_TO_KEY
Instance Method Summary collapse
-
#launch ⇒ Object
GET the bare mount — resolve/mint the run and redirect to its step.
-
#show ⇒ Object
GET .../:step — render the current step.
-
#update ⇒ Object
POST .../:step — advance / back / cancel.
Methods included from Driving
Methods included from StructuredInputs::ParamsConcern
Methods included from Core::Controller
Methods included from Core::Controllers::AssociationResolver
Methods included from Core::Controllers::EntityScoping
#scoped_entity_class, #scoped_entity_param_key, #scoped_entity_route_key, #scoped_entity_strategy, #scoped_to_entity?
Methods included from Core::Controllers::Bootable
#current_engine, #current_package
Instance Method Details
#launch ⇒ Object
GET the bare mount — resolve/mint the run and redirect to its step.
52 53 54 |
# File 'lib/plutonium/wizard/controller.rb', line 52 def launch wizard_launch end |
#show ⇒ Object
GET .../:step — render the current step.
57 58 59 |
# File 'lib/plutonium/wizard/controller.rb', line 57 def show wizard_show end |
#update ⇒ Object
POST .../:step — advance / back / cancel.
62 63 64 |
# File 'lib/plutonium/wizard/controller.rb', line 62 def update wizard_update end |