ACMCMU/BoredPrototype — Issue #15: Clean validation logic from events controller
Author: MasterPie
Created: 2012-02-19 23:32:58+00:00
State: open
Labels: Back-End

Validation logic should ideally stay in the model.

In the model, if there is an invariant violation, you simply add an error to self.errors. Then, everything else falls in place (since you can only save an event in the controller if @event.errors is empty).