# RESTful Thinking

**URL:** <https://www.ruby-forum.com/t/restful-thinking/116396>\
**Category:** Rails\
**Created:** [October 5, 2007, 5:21am UTC](https://www.ruby-forum.com/t/restful-thinking/116396 "2007-10-05T05:21:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 5, 2007, 5:21am UTC](https://www.ruby-forum.com/t/restful-thinking/116396/1 "2007-10-05T05:21:57Z")

</div>

Okay, so I am trying to embrace the RESTful approach to web  
application design and wanted to get some feedback from others. I  
understand that it can be done different ways, I’m just interested to  
see what real RESTful theorists think. Lets say that you have an  
application that has lists and items on that list. I can see how both  
lists and items can be set up as resources. Now, lets say you want to  
have an action to both show you the current sorted list\* and then  
allow you to save a new sort. You would need a custom GET action to  
“show\_sort” and a PUT or POST to “save\_sort”.

map.resources :lists :member =\> {:show\_sort =\> :get, :save\_sort  
=\> :put}

or

map.resources :items :collection =\> {:show\_sort =\> :get, :save\_sort  
=\> :put}

This just seems weird. Neither look great or feel RESTful. The  
resource you are interacting with is really the item\_sort, but I can’t  
imagine people would create a model for that? Am I over thinking  
things? What would other people recommend in this scenario?

Thanks,  
Tom

- Ideally you could show the sort and make modifications right on the  
show action of the list, but for discussion lets assume a separate  
action is required.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 5, 2007, 5:27am UTC](https://www.ruby-forum.com/t/restful-thinking/116396/2 "2007-10-05T05:27:47Z")

</div>

It’s not clear to me what your goal is? Can you explain it again?
