From a8eb90fcee1efdc491c9eb030827b46929ea979c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 10 Jan 2008 03:17:20 +0000 Subject: Move fragment caching from special helper methods to TemplateHandler. Closes #10754 [Josh Peek] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/template_handlers/builder.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/lib/action_view/template_handlers/builder.rb') diff --git a/actionpack/lib/action_view/template_handlers/builder.rb b/actionpack/lib/action_view/template_handlers/builder.rb index 0f49d6ab31..88044917dd 100644 --- a/actionpack/lib/action_view/template_handlers/builder.rb +++ b/actionpack/lib/action_view/template_handlers/builder.rb @@ -14,6 +14,12 @@ module ActionView template + "\nxml.target!\n" end + + def cache_fragment(block, name = {}, options = nil) + @view.fragment_for(block, name, options) do + eval('xml.target!', block.binding) + end + end end end end -- cgit v1.2.3