I defined this on my controller (TestingController):
function by_name(){
echo "by_name";
die();
}
function byName(){
echo "byName";
die();
}
And the results are:
/testing/by_name --> by_name
/testing/byName --> byName
If I set the following route
Router::connect('/testing/by_name/*', array(
'controller' => "testing",
'action' => "byName",
));
the results are:
/testing/by_name --> byName
/testing/byName --> byName
Both urls are mapped to TestingController:byName
and TestingController:by_name is no longer needed (I removed it to test
this case)
Saludos,
Pablo Viojo
[email protected]
http://pviojo.net
(#260 y creciendo!)
------------------------------------------------------------
Ayudar nos hace felices!
http://needish.com - http://helperman.org
On Fri, May 29, 2009 at 5:21 PM, Pablo Viojo <[email protected]> wrote:
> Can you post the URL that allow to access and the URL that throws an error?
> (becuse I get lost! :) )
> Saludos,
>
> Pablo Viojo
> [email protected]
> http://pviojo.net
> (#260 y creciendo!)
>
> ------------------------------------------------------------
> Ayudar nos hace felices!
> http://needish.com - http://helperman.org
>
>
>
>
> On Fri, May 29, 2009 at 3:42 PM, smeenai <[email protected]> wrote:
>
>>
>> Hey all, just getting started with CakePHP and came across a small
>> problem. I have a controller with a function named byName. I'm quoting
>> http://book.cakephp.org/view/46/Routes-Configuration:
>>
>> "/products/view_clearance maps to the viewClearance() action of the
>> ProductsController"
>>
>> However, when I try to access this action using by_name in the URL, I
>> get an action not found error message. If I use byName in the URL it
>> works perfectly. I did a search and
>>
>> http://groups.google.com/group/cake-php/browse_thread/thread/e19f277a27dcef71/2d2bf4f18f9a671b?lnk=gst&q=urls+actions+underscores#2d2bf4f18f9a671b
>> has a similar issue as far as I can tell. In that thread, Pablo Viojo
>> also states in his second post that this is supposed to be the
>> standard behaviour, so it might be some sort of bug. I'm using Cake
>> 1.2.3.8166, downloaded from Sourceforge.
>>
>> Cheers.
>>
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---