Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]

This commit is contained in:
David Heinemeier Hansson 2010-01-07 17:45:32 -08:00
parent 1ddf17dff0
commit 5ea130943e
2 changed files with 3 additions and 1 deletions

@ -1,5 +1,7 @@
*Edge*
* Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
* Added that ActionController::Base now does helper :all instead of relying on the default ApplicationController in Rails to do it [DHH]
* Added ActionDispatch::Request#authorization to access the http authentication header regardless of its proxy hiding [DHH]

@ -37,7 +37,7 @@ def fragment_cache_key(key)
def fragment_for(buffer, name = {}, options = nil, &block) #:nodoc:
if perform_caching
if fragment_exist?(name,options)
buffer.concat(read_fragment(name, options))
buffer.concat(read_fragment(name, options).html_safe!)
else
pos = buffer.length
block.call