diff options
Diffstat (limited to 'actionpack/lib/action_view/template_handlers')
-rw-r--r-- | actionpack/lib/action_view/template_handlers/builder.rb | 7 | ||||
-rw-r--r-- | actionpack/lib/action_view/template_handlers/erb.rb | 6 | ||||
-rw-r--r-- | actionpack/lib/action_view/template_handlers/rjs.rb | 11 |
3 files changed, 1 insertions, 23 deletions
diff --git a/actionpack/lib/action_view/template_handlers/builder.rb b/actionpack/lib/action_view/template_handlers/builder.rb index cbe53e11d8..335ec1abb4 100644 --- a/actionpack/lib/action_view/template_handlers/builder.rb +++ b/actionpack/lib/action_view/template_handlers/builder.rb @@ -9,15 +9,10 @@ module ActionView # ActionMailer does not have a response "controller.respond_to?(:response) && controller.response.content_type ||= Mime::XML;" + "xml = ::Builder::XmlMarkup.new(:indent => 2);" + + "self.output_buffer = xml.target!;" + template.source + ";xml.target!;" 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 diff --git a/actionpack/lib/action_view/template_handlers/erb.rb b/actionpack/lib/action_view/template_handlers/erb.rb index ac715e30c2..2f2febaa52 100644 --- a/actionpack/lib/action_view/template_handlers/erb.rb +++ b/actionpack/lib/action_view/template_handlers/erb.rb @@ -51,12 +51,6 @@ module ActionView src = ::ERB.new(template.source, nil, erb_trim_mode, '@output_buffer').src "__in_erb_template=true;#{src}" end - - def cache_fragment(block, name = {}, options = nil) #:nodoc: - @view.fragment_for(block, name, options) do - @view.response.template.output_buffer - end - end end end end diff --git a/actionpack/lib/action_view/template_handlers/rjs.rb b/actionpack/lib/action_view/template_handlers/rjs.rb index 3892bf1d6e..a700655c9a 100644 --- a/actionpack/lib/action_view/template_handlers/rjs.rb +++ b/actionpack/lib/action_view/template_handlers/rjs.rb @@ -7,17 +7,6 @@ module ActionView "controller.response.content_type ||= Mime::JS;" + "update_page do |page|;#{template.source}\nend" end - - def cache_fragment(block, name = {}, options = nil) #:nodoc: - @view.fragment_for(block, name, options) do - begin - debug_mode, ActionView::Base.debug_rjs = ActionView::Base.debug_rjs, false - eval('page.to_s', block.binding) - ensure - ActionView::Base.debug_rjs = debug_mode - end - end - end end end end |