diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-19 11:54:12 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-19 11:54:12 +0200 |
commit | a66c91723565d37969de4cb46baa50fb8865b02a (patch) | |
tree | 7eb51d421970713ec0a0d85bbd4474c8bd75f19b /actionpack/lib/action_controller/metal | |
parent | 6380f1a9f45e68f38480c0805cac62eb6708f72e (diff) | |
download | rails-a66c91723565d37969de4cb46baa50fb8865b02a.tar.gz rails-a66c91723565d37969de4cb46baa50fb8865b02a.tar.bz2 rails-a66c91723565d37969de4cb46baa50fb8865b02a.zip |
Do not inherit from Rack::Response, remove a shit-ton of unused code.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 32d52c84c4..70fd79bb8b 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -18,6 +18,17 @@ module ActionController response_body end + # Overwrite render_to_string because body can now be set to a rack body. + def render_to_string(*) + if self.response_body = super + string = "" + response_body.each { |r| string << r } + string + end + ensure + self.response_body = nil + end + private # Normalize arguments by catching blocks and setting them on :update. |