This is a simple app using the Interactor gem.
- Use interactors in order to handle the new comment
- One interactor to actually store the comment
- One to send a ThankYou message to the commenter (not really send anything)
- One to log the event through a Mixpanel kind of app (not really logging anything)
- Show an example of a rollback, just check the box before adding a comment
- Show an example of hook usage
- Show an example with multiple hooks
- The code also contains some test best practices
$> [email protected]:beNjiox/interactor-sample.git
$> cd interactor-sample
$> rake db:migrate
If you clone the app, check out the logs! It will help you see how things are executed, in which order etc.
If you have any question, or want to see more stuff within this example app, feel free to create an issue.