lib/roar/rails/controller_additions.rb in roar-rails-0.0.8 vs lib/roar/rails/controller_additions.rb in roar-rails-0.0.9

- old
+ new

@@ -35,10 +35,10 @@ def consume!(model, options={}) format = formats.first # FIXME: i expected request.content_mime_type to do the job. copied from responder.rb. this will return the wrong format when the controller responds to :json and :xml and the Content-type is :xml (?) representer = representer_for(format, model, options) extend_with!(model, representer) - model.send(compute_parsing_method(format), request.body.string) # e.g. from_json("...") + model.send(compute_parsing_method(format), request.body.read) # e.g. from_json("...") model end # Central entry-point for finding the appropriate representer. def representer_for(format, model, options={})