Closed jaysylvester closed 2 years ago
handoff()
now checks for the existence of the handoff controller (which includes layout controllers) and throws an error if it doesn't exist.
As part of this change, I also abstracted the controller config into its own method so it can be used in multiple locations. Controller config is now inherited by subsequent controllers in the chain, but include controllers are sandboxed; the config is reset prior to passing params
to the include.
fireController()
doesn't check for the existence of the controller it's asked to fire, because that happens further up the chain in the initial request, so if the called controller config specifies a non-existent layout controller, the controller handoff causesfireController()
to throw a 500 and get caught in a loop.