Form from another model in a view

2011-11-14 Thread Diogo
So I'm trying to extend the Blog tutorial adding some comments: Post hasMany Comments I want to display the add comment form in the same view as the 'post view'. Thing is I don't know the best way to get this approach. I thought about three ways: Creating a function in Comments Controller to

Re: Form from another model in a view

2011-11-14 Thread phpMagpie
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

Re: Form from another model in a view

2011-11-14 Thread Diogo
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 p...@webbedit.co.uk wrote: I don't think there is a right and wrong way to be honest, I