# ReSTfull route conventions

**URL:** <https://www.ruby-forum.com/t/restfull-route-conventions/135373>\
**Category:** Rails\
**Created:** [April 21, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/restfull-route-conventions/135373 "2008-04-21T17:22:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 21, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/restfull-route-conventions/135373/1 "2008-04-21T17:22:28Z")

</div>

I have a question regarding restful routing and the uri conventions  
presently in use, specifically the /new and /{id}/edit uri’s.

I have been giving these two some thought and it seems to me that there  
exists a cleaner approach to this then simply tacking on a procedure  
call to the end of the uri.

Compare:

[http://localhost:3000/clients/new](http://localhost:3000/clients/new) with [http://localhost:3000/client](http://localhost:3000/client)

:method =\> ‘get’ followed by a ‘post’

and

[http://localhost:3000/clients/1/edit](http://localhost:3000/clients/1/edit) with [http://localhost:3000/client/1](http://localhost:3000/client/1)

:method =\> ‘get’ followed by a ‘put’

In both cases the use of the singular creates a unique mapping of the  
underlying http verb (get) to the Rails methods ‘new’ and ‘edit’  
respectively. There remains the self-evident problem of dealing with  
nouns that share plural and singular forms, a sheep versus a flock of  
sheep for instance. However, I believe that this issue could, and  
probably should, be circumvented by a careful choice of terminology.

So, why did Rails elect to use the rpc style for just new and edit  
rather than inferencing the action from the base resource uri?
