From 71c9337f45f9c5461cbc6ddf6cab764ad0f82c3b Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Thu, 18 Mar 2010 15:52:43 -0700 Subject: All tests pass without memoizing view_context --- actionpack/lib/action_controller/caching/fragments.rb | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'actionpack/lib/action_controller/caching/fragments.rb') diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 8a10bdfe23..473a2fe214 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -34,25 +34,6 @@ module ActionController #:nodoc: ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views) end - def fragment_for(name = {}, options = nil, &block) #:nodoc: - if perform_caching - if fragment_exist?(name, options) - read_fragment(name, options) - else - # VIEW TODO: Make #capture usable outside of ERB - # This dance is needed because Builder can't use capture - buffer = view_context.output_buffer - pos = buffer.length - yield - fragment = buffer.slice!(pos..-1) - write_fragment(name, fragment, options) - end - else - ret = yield - ActiveSupport::SafeBuffer.new(ret) if ret.is_a?(String) - end - end - # Writes content to the location signified by key (see expire_fragment for acceptable formats) def write_fragment(key, content, options = nil) return content unless cache_configured? -- cgit v1.2.3