aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-04-16 01:09:05 +0200
committerJosé Valim <jose.valim@gmail.com>2011-04-16 01:10:13 +0200
commitfad214b9e1c0a66f8fecde48fbd8d122e5c51e33 (patch)
tree3ca51e274e0992c460e28c81f501398757669899 /actionpack/lib/action_view/helpers
parentc630750fa59e248fb5af96f850392333e341ccd7 (diff)
downloadrails-fad214b9e1c0a66f8fecde48fbd8d122e5c51e33.tar.gz
rails-fad214b9e1c0a66f8fecde48fbd8d122e5c51e33.tar.bz2
rails-fad214b9e1c0a66f8fecde48fbd8d122e5c51e33.zip
Initial work on fibered layout.
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/capture_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb
index 3808e231f1..f8b5605ed9 100644
--- a/actionpack/lib/action_view/helpers/capture_helper.rb
+++ b/actionpack/lib/action_view/helpers/capture_helper.rb
@@ -135,8 +135,8 @@ module ActionView
# for elements that will be fragment cached.
def content_for(name, content = nil, &block)
content = capture(&block) if block_given?
- @_content_for[name] << content if content
- @_content_for[name] unless content
+ result = @_view_flow.append(name, content) if content
+ result unless content
end
# content_for? simply checks whether any content has been captured yet using content_for
@@ -158,7 +158,7 @@ module ActionView
# </body>
# </html>
def content_for?(name)
- @_content_for[name].present?
+ @_view_flow.get(name).present?
end
# Use an alternate output buffer for the duration of the block.