On Thu, May 15, 2008 at 4:00 PM, benjam <[EMAIL PROTECTED]> wrote:
>
> That's a big help, but not enough to fix the issue.  In fact just the
> opposite.
> I'm not trying to adjust the controller to the URL, I'm trying to
> adjust the URL in the controller.
>
> The issue I'm having is when I tell Cake that I want to use the
> 'Vinny' Controller, it runs off and grabs VinnyController, but then
> tries to forward that to /vinnies/ instead of /vinny/.
>
> For instance, when I create a form using $form->create('Vinny'); in
> the form, as the action attribute of the tag, it has "/vinnies/add".
> The URL I am using is /vinny/ask.


Try this (if you haven't already):

* Call your controller VinniesController.
* set up a route: Router::connect('/vinny/ask',
array('controller'=>'vinnies', 'action'=>'add'));

With any luck, the reverse routing lookup will automatically fix your
URL. If it doesn't, the following addition should work:

* $form->create('Vinny', array('controller'=>'vinnies', 'action'=>'add'));

again, it should pick up the association and you'll be off to the races.

Alternatively, set up a VinnyController and manually do
array('controller'=>'vinny', 'action'=>'ask').

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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