module ActionView::Helpers::CaptureHelper

def flush_output_buffer #:nodoc:

:nodoc:
Add the output buffer to the response body and start a new one.
def flush_output_buffer #:nodoc:
  if output_buffer && !output_buffer.empty?
    response.body_parts << output_buffer
    self.output_buffer = output_buffer.respond_to?(:clone_empty) ? output_buffer.clone_empty : output_buffer[0, 0]
    nil
  end
end