aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/capture_helper.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-03-24 12:10:38 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-24 12:10:38 +0000
commit4687306c2c1d94b0db6d66625867d881838b76d6 (patch)
treeec54e4d91113e8d3b6a481912a687aa97e3c63e2 /actionpack/lib/action_view/helpers/capture_helper.rb
parent2f340d050b0327d809b10bb661ee0dd127777256 (diff)
parent6ed42ebdff05f9d28a60e91093d8f9afad03a958 (diff)
downloadrails-4687306c2c1d94b0db6d66625867d881838b76d6.tar.gz
rails-4687306c2c1d94b0db6d66625867d881838b76d6.tar.bz2
rails-4687306c2c1d94b0db6d66625867d881838b76d6.zip
Merge commit 'mainstream/master'
Conflicts: railties/guides/images/fxn.jpg railties/guides/rails_guides/generator.rb
Diffstat (limited to 'actionpack/lib/action_view/helpers/capture_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/capture_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb
index e86ca27f31..9e39536653 100644
--- a/actionpack/lib/action_view/helpers/capture_helper.rb
+++ b/actionpack/lib/action_view/helpers/capture_helper.rb
@@ -131,6 +131,14 @@ module ActionView
ensure
self.output_buffer = old_buffer
end
+
+ # Add the output buffer to the response body and start a new one.
+ def flush_output_buffer #:nodoc:
+ if output_buffer && output_buffer != ''
+ response.body_parts << output_buffer
+ self.output_buffer = ''
+ end
+ end
end
end
end