Recipes
The recipes in this section are task-focused guides for the things you actually do with Funes. Each recipe assumes that you’ve met the Concepts and shows you how to put them to work in a real Rails app: append events from controllers, translate messages, coordinate with sibling writes, interpret events with a historic perspective, and ship projections to the destination that fits.
- Set up projections — virtual or persistent (default-database or custom-destination) projections
- Events as first-class Rails citizens — forms, controllers, and I18n all work as you’d expect
- Validate events in interpretation time — add errors from inside an interpretation block, with both the event and the state in view
- Read the right error collection — pick between
own_errors,state_errors, and the mergederrorsfor what you need to show - Atomic writes — coordinate
append!with sibling writes inside a transaction you control - Attach meta information to events — record the user and request context behind every event
- Build bi-temporal event streams — interpret with
as_ofandatfor full historical reconstruction - Test projections — exercise interpretations in isolation with
ProjectionTestHelper - Reference Active Record models — point events and materialization models at the rest of your Rails app with
refers_to