On Nov 20, 7:24 am, Dianne  van Dulken <[EMAIL PROTECTED]> wrote:
> Thanks for that Yolabingo.
>
> It turned out I was making it all a bit too difficult for myself, so
> I'll put the solution here in case anyone else is having the same
> problem.
>
> Same as above except what I had to do before save is to force the
> ['articles']['articles'] values to be my array.  So
>
>         function beforeSave() {
>                 $this->data['Articles']['Articles'] =  explode(",", 
> $_POST["data"]
> ['teasers']["articles"]); // saves the articles list information in
> the joint table.
>            return parent::beforeSave();
>    }
>
> is the correct beforeSave.

Why are you referring to $_POST at all?

Models should never look for info like that, it'll already be in $this-
>data when you are in the model, and if it isn't there is an error/
misunderstanding in your controller code.

AD
--~--~---------~--~----~------------~-------~--~----~
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