On 2/21/07, jamieh <[EMAIL PROTECTED]> wrote:
>
> Hi again [EMAIL PROTECTED],
>
> Eventually managed to get back onto this. I am a little lost now as I
> don't understand why i would need to use:
>
> $uses = array("Users", "Projects");
You would need that if your User and Project are not associated. and
you are wanting to do operations on Project from within your
UsersController - looks like this is not the case
> My biggest problem is the understanding of AJAX and how models work
> together within AJAX operations!
The same as normal CakePHP
> Would the best approach be to have my Projects::Add inside my Users
> controller like Users::AddProject for example?
Yes because you are doing/wanting to do $this->User->Project->save()
within the UsersController - the action for whatever you are doing is
still in UsersController.
But still this is not what you are wanting to do (but doing ;) )
> If i have in Users::Add the following:
>
> $this->render('projects/add/', 'ajax');
Try using $this->render(null,null,'complete/path/to/project/add.thtml');
Should work, and I presume that the form will submit to ProjectsController::add
HTH
Tarique
--
=============================================================
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=============================================================
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---