This is my function that should do the following:

1. Pull the client id from the url, ex: /client/link_gallery/2 (this
tests fine)
2. Grab the 'dragged' gallery id from the ajax helper (this tests
fine)
3. Save the gallery id into the 'gallery_id' of the Clients model, on
the clients row pulled from the client id. (probably broken)

I'm thinking that the data[][] array can't be 'invented' in the way I
did it, but I wasn't sure how to do this without submitting a form.
I'm not sure what the actual problem is however.  Right now, it seems
that everything works except the save.

        function link_gallery($client_id) {

                //Set the id of the client to save, passed by url and pulled in 
at
the top of this function
                $this->data['Client']['id'] = $client_id;

                //Grab the dragged gallery id
                $gallery_id = $this->params['form']['draggedid'];

                //Set the client gallery_id from the line above
                $this->data['Client']['gallery_id'] = $gallery_id;

                $this->Client->save($this->data);

                //Re-query and output everything with new values
                $this->set('client', $this->Client->findById($client_id));
                $this->set('drug', $this->params['form']['draggedid']);
                $this->render('link_gallery');
        }

thanks for your help!
-dan


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