From 29078ff8f1561420a405384772c051dc30bdcbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 16 Apr 2011 10:50:33 +0200 Subject: Basic tests for streaming. Basic tests for provide. --- actionpack/lib/action_view/flows.rb | 2 +- actionpack/lib/action_view/renderer/streaming_template_renderer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/flows.rb b/actionpack/lib/action_view/flows.rb index 1ac62961d1..b81a34002a 100644 --- a/actionpack/lib/action_view/flows.rb +++ b/actionpack/lib/action_view/flows.rb @@ -13,7 +13,7 @@ module ActionView end def set(key, value) - @content[key] = value + @content[key] = (ActiveSupport::SafeBuffer.new << value) end def append(key, value) diff --git a/actionpack/lib/action_view/renderer/streaming_template_renderer.rb b/actionpack/lib/action_view/renderer/streaming_template_renderer.rb index a8c6ecbde1..1ea00d15ea 100644 --- a/actionpack/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionpack/lib/action_view/renderer/streaming_template_renderer.rb @@ -20,7 +20,7 @@ module ActionView # object that responds to each. This object is initialized with a block # that knows how to render the template. def render_template(template, layout_name = nil, locals = {}) #:nodoc: - return [super] unless template.supports_streaming? + return [super] unless layout_name && template.supports_streaming? locals ||= {} layout = layout_name && find_layout(layout_name, locals.keys) -- cgit v1.2.3