class ActionView::Template

def supports_streaming?

a streaming buffer *may* be passed when it starts rendering.
Returns whether the underlying handler supports streaming. If so,
def supports_streaming?
  handler.respond_to?(:supports_streaming?) && handler.supports_streaming?
end