That's exactly my line of thinking. I might use a comments controller
if it's being used on more than one model. Other than that, I think
it's not worth all the work. Thanks!

On Nov 14, 2:32 pm, phpMagpie <[email protected]> wrote:
> I don't think there is a right and wrong way to be honest, I have done this
> in the Comment controller and in my BlogPost controller, if comments are
> used across many models then probably best to centralize logic in comments
> controller.
>
> I don't worry about field by field validation errors for comments because
> there are only 2-3 fields, instead I use:
> if ($this->BlogPost->Comment->save($this->data)) {
>   $this->Session->setFlash('<p>Comment added.</p>', 'default', null,
> 'comment');} else {
>
>   $this->Session->setFlash('<p>Comment not added, correct errors and
> resubmit.</p>', 'default', array('class'=>'error'), 'comment');
>
> }
>
> And echo $this->Session->flash('comment'); in the view
>
> HTH, Paul.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to