cakephp/cakephp — pull request #616 by Hyra (2012-04-20 14:17:23+00:00)
Title: Added prefix to array of passed arguments

Prefix from Routing.prefixes wasn't getting propogated for mapResourced routes.

Adding the prefix parameter to the Router::connect within mapResources() fixes this.

To reproduce the problem:

core.php:
// Add this
Configure::write('Routing.prefixes', array('admin', 'api'));

routes.php
// Add this (projects is an example controller)
Router::mapResources('projects', array('prefix' => '/api/'));

Then do a POST request to /api/projects
This will end up at the "add" method instead of ":prefix_add"