Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Controllers

Robert Kranz edited this page Sep 9, 2013 · 1 revision

Controllers per se are standard rails controllers, except for all actions involving changing the model.
For example a create action. Instead of directly creating a new model unit, it should create a command and do some minor validations like length or something. Heavier validations involving the model should be done in the domain.
After validation the command should be send to the domain server like this:

Domain.run_command your_command

This methods returns true, if the domain validations succeded and the model will be changed. If something failed, the method will return false.

Clone this wiki locally