aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/capture_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb
index 1877730c7e..d430121b04 100644
--- a/actionpack/lib/action_view/helpers/capture_helper.rb
+++ b/actionpack/lib/action_view/helpers/capture_helper.rb
@@ -82,9 +82,9 @@ module ActionView
# NOTE: Beware that content_for is ignored in caches. So you shouldn't use it
# for elements that are going to be fragment cached.
def content_for(name, &block)
- base = controller.instance_variable_get(instance_var_name(name)) || ""
+ base = instance_variable_get(instance_var_name(name)) || ""
data = capture(&block)
- controller.instance_variable_set(instance_var_name(name), base + data)
+ instance_variable_set(instance_var_name(name), base + data)
data
end