lib/roar/rails/controller_additions.rb in roar-rails-0.1.1 vs lib/roar/rails/controller_additions.rb in roar-rails-0.1.2

- old
+ new

@@ -46,10 +46,14 @@ def compute_parsing_method(format) "from_#{format}" end def incoming_string - request.body.read + body = request.body + + # this is my first respond_to? ever and i hate it (thanks, Rails :) + return body.string if body.respond_to?(:string) + body.read end def render_to_body(options) if res = options[formats.first] and res.is_a?(Roar::Rails::Responder::Response) response.content_type = res.content_type \ No newline at end of file