In my conversations view, I’m trying to make it so I can add messages to a conversation.
Currently I have a Conversation hasMany Messages relationship.
Now when I try to invoke the following code:
<?=$ajax->form('message','post',array('update'=>'messages')); ?>
It produces a form with a form action to
action="facebook/conversations/messages/add"
So I get an error saying I don’t have the a controller function labeled “messages” in my conversations controller.
I want the action to go to my messages controller instead.
I’m sure its some really silly code I have to implement, but I’d really appreciate your help.
From the CakePHP Book you can also use a slightly different variant of the Ajax form function and avoid using the Html Helper to build the url.