owncloud/core — pull request #9228 by Raydiation (2014-06-26 12:10:13+00:00)
Title: Dont strip the s from the resource in routing to prevent possible weird behavior

# Addresses the following problem:

If a user creates a resource **accounts** for instance, the **s** at the end is stripped for the id paramter so the id would become **{accountId}** in the url. This can lead to a number of various weird behaviors.

I think its better to not strip the s and use resources in singular, not only because this has to be documented but also because transition from a normal route to a resource should be simple e.g.:

'routes' => array(
array('name' => 'author#index', 'url' => '/authors', 'verb' => 'GET'),
array('name' => 'author#show', 'url' => '/authors/{authorId}', 'verb' => 'GET'),
array('name' => 'author#create', 'url' => '/authors', 'verb' => 'POST'),
array('name' => 'author#update', 'url' => '/authors/{authorId}', 'verb' => 'PUT'),
array('name' => 'author#destroy', 'url' => '/authors/{authorId}', 'verb' => 'DELETE'),
)

should become

'resources' => array(
array('author' => array('url' => '/authors'))
),

and

'routes' => array(
array('name' => 'authors#index', 'url' => '/authors', 'verb' => 'GET'),
array('name' => 'authors#show', 'url' => '/authors/{authorsId}', 'verb' => 'GET'),
array('name' => 'authors#create', 'url' => '/authors', 'verb' => 'POST'),
array('name' => 'authors#update', 'url' => '/authors/{authorsId}', 'verb' => 'PUT'),
array('name' => 'authors#destroy', 'url' => '/authors/{authorsId}', 'verb' => 'DELETE'),
)

should become

'resources' => array(
array('authors' => array('url' => '/authors'))
),

@MorrisJobke @DeepDiver1975 @Kondou-ger @LEDfan