Debugging Event Payloads

Here are examples of event payloads for a typical CRUD controller. You must always specify the path key.

Action Payload Notes
posts#index {"path": "/posts"} Path is always required.
posts#new {"path": "/posts/new"} The new action uses the path to generate the new form.
posts#show {"path": "/posts/123"} The post id must be provided and exist in the database or you’ll get a “Couldn’t find Post without an ID” error. 123 is an example.
posts#edit {"path": "/posts/123/edit", "pathParameters": {"id": "123"}} You will also need pathParameters because that’s how the controller gets the id parameter.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub, and contributions are encouraged and welcomed. We love pull requests from you!