wildbee/wildbee — pull request #30 by FranciscoCanas (2013-12-08 15:05:36+00:00)
Title: Crud lifecycles

Submitting this PR to show progress on the CRUD "lifecycles" trait that we talked about on friday:

Currently, all common CRUD operations have before and after methods defined in the trait LifecycleTraits. The aim of these traits is to make it easier and cleaner for models to have specialized logic during CRUD operations. Instead of overriding/rewriting the Queriable CRUD operation (and duplicating code), we just override the appropriate before/after operation in the model and put the logic in that. See Workflow as a working example.

I added some notes to workflow's model and controller delete methods. I don't think we should be overriding and customizing them just to put validation in them. The goal, I think, should be: no custom logic in the common CRUD and controller methods.