On Wed, Oct 19, 2011 at 2:04 AM, Damien MATHIEU <[email protected]> wrote:

> Since this commit :
> https://github.com/rails/rails/commit/0d3333257156544feba729ba28f6874d5a30d561
> PUT requests made on a controller using respond_with with the format json
> render an empty hash.
> José explains in the comments why it does so and it doesn't just renders
> the modified document, like we do in POST.
>
> I would like to propose changing that default though, in the respond_with
> and the scaffold to respond the modified object instead of an empty hash.
>

PUT should respond with 204 No Content, rather than 200 OK, and omit the
body.

(Since it's responding with 200 OK today, including a JSON body makes sense,
but an empty JSON object doesn't make sense to me.)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to