From 1dacc19702f88a18a57615d1a5eeab3d0f5f9007 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Thu, 18 Mar 2010 17:32:53 -0700 Subject: Return a valid Rack response from bare ActionController::Metal --- actionpack/lib/abstract_controller/rendering.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'actionpack/lib/abstract_controller') diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index eec7e520fa..402ad7c8d7 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -76,7 +76,7 @@ module AbstractController # :api: plugin def render_to_string(options={}) _normalize_options(options) - AbstractController::Rendering.body_to_s(render_to_body(options)) + render_to_body(options) end # Find and renders a template based on the options given. @@ -90,18 +90,6 @@ module AbstractController controller_path end - # Return a string representation of a Rack-compatible response body. - def self.body_to_s(body) - if body.respond_to?(:to_str) - body - else - strings = [] - body.each { |part| strings << part.to_s } - body.close if body.respond_to?(:close) - strings.join - end - end - private # This method should return a hash with assigns. -- cgit v1.2.3