Tuesday, August 14, 2007

Robbie on Rails Part 3 - The Conflict of Redirect vs Render

RFC2616, 10.2.2 says that a HTTP response code of 201 should be the response when creating a new resource but from a user experience view, I'd want to be redirected to the new resource. However, this returns a 302 redirected code which goes against the RFC.

Hmm, this is a bit of a problem. We can render the new resource using "render :action => 'action'", but it doesn't show the URI to the user who may want this.

It's pretty frustrating, and for now I can't find a way around it, so I'm defaulting to user experience.

No comments: