aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/erb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template_handlers/erb.rb')
-rw-r--r--actionpack/lib/action_view/template_handlers/erb.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/template_handlers/erb.rb b/actionpack/lib/action_view/template_handlers/erb.rb
index 87cb09952c..26cca586ba 100644
--- a/actionpack/lib/action_view/template_handlers/erb.rb
+++ b/actionpack/lib/action_view/template_handlers/erb.rb
@@ -25,6 +25,12 @@ module ActionView
def compile(template)
::ERB.new(template, nil, @view.erb_trim_mode).src
end
+
+ def cache_fragment(block, name = {}, options = nil) #:nodoc:
+ @view.fragment_for(block, name, options) do
+ eval(ActionView::Base.erb_variable, block.binding)
+ end
+ end
end
end
end