aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-04-16 10:50:33 +0200
committerJosé Valim <jose.valim@gmail.com>2011-04-16 10:50:33 +0200
commit29078ff8f1561420a405384772c051dc30bdcbf6 (patch)
tree50858283c5dc58d2060ae9340e33b02b1a4e69fa /actionpack/lib
parent62668cccb9a288b0cd6f6dd49df71661164be2c4 (diff)
downloadrails-29078ff8f1561420a405384772c051dc30bdcbf6.tar.gz
rails-29078ff8f1561420a405384772c051dc30bdcbf6.tar.bz2
rails-29078ff8f1561420a405384772c051dc30bdcbf6.zip
Basic tests for streaming. Basic tests for provide.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/flows.rb2
-rw-r--r--actionpack/lib/action_view/renderer/streaming_template_renderer.rb2
2 files changed, 2 insertions, 2 deletions
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)