It''s not clear to me what your goal is? Can you explain it again?
On Oct 4, 8:21 pm, TomRossi7
<t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org>
wrote:> 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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---