Closed hmartinh closed 9 years ago
well i think it's best in controller, but the validation part should probably rest in the model. I wasn't consistently when i wrote that. I will see if i can improve that when refactoring some more things.
this is now gone after refactoring the whole thing.
why for comments u use $comment = new \Model\Comment(); if ($comment->addToPost($this->resource->_id)) { and after in model use cortex foreach.
but in resource script u use cortex foreach from controller. what is the right way of editing db? with set_ in model or with side function in model that used by controller? sorry for my english :)