It should work if you have a function cleanComment() in your Comment
model.
$this->Post->Comment is an instance of the comment model and have all
its functions.

But the better is to test if it's right and tell us the result ;)

On 13 mai, 20:46, johnvv <[EMAIL PROTECTED]> wrote:
> I'm wondering what the best practice is for calling a method from
> inside one controller that happens to associate with another Model/
> Controller.
>
> For Instance, if I have a blog post that has many comments and I want
> to run a method within the CommentsController to format/clean the
> comment... how would I do this?
>
> I doubt something like this would work....
>
> PostController {
> ...
> function view($id){
> ..
> $this->Post->Comment->cleanComment();
>
> }
>
> Thoughts?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to