On 20/06/2010 17:18, Marnen Laibow-Koser wrote:
<snip>
/users/edit would seem like it's supposed to edit *all* users.  You
probably want something like /user/edit .
<snip>

Sorry, going to commit the sin of not answering your question directly :)

Would an approach such as this not make your interface less clear?

Within the Rails interpretation of REST, a path such as user/edit would still make it seem as if you are working on a collection rather than a member.

While users/1234/edit may be redundant because your code is taking care of determining the user, the consumer of this interface should not need to know about this. Even if it is redundant, I would say the clarity that you achieve by using users/:id/edit outweighs the cost of the duplication.

Perhaps an approach would be to return a 403 if the consumer tries to edit a user that is not a current user?


--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to