diff options
author | Dieter Komendera <dieter@komendera.com> | 2011-07-19 17:02:22 +0200 |
---|---|---|
committer | Dieter Komendera <dieter@komendera.com> | 2011-07-23 23:41:33 +0200 |
commit | 8ae7008ac3d77cca42350007e99efe672e7b8e40 (patch) | |
tree | b97eb9cbfd98d64c020f8f440f03a67b994db4d6 /actionpack/lib | |
parent | 410e75419d2ffdee56a465eb551f868af7063176 (diff) | |
download | rails-8ae7008ac3d77cca42350007e99efe672e7b8e40.tar.gz rails-8ae7008ac3d77cca42350007e99efe672e7b8e40.tar.bz2 rails-8ae7008ac3d77cca42350007e99efe672e7b8e40.zip |
Fix fragment cache helper regression on cache miss introduced with 03d01ec7.
Contains following patches cherry-picked from @lhahne's 3-0-stable branch:
* Added tests for the output_buffer returned by CacheHelper (c476a6b)
The output_buffer returned by CacheHelper should be html_safe if the original buffer is html_safe.
* made sure that the possible new output_buffer created by CacheHelper is of the same type as the original (39a4f67)
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/cache_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb index f81ce3e31c..850dd5f448 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionpack/lib/action_view/helpers/cache_helper.rb @@ -54,7 +54,7 @@ module ActionView output_safe = output_buffer.html_safe? fragment = output_buffer.slice!(pos..-1) if output_safe - self.output_buffer = output_buffer.html_safe + self.output_buffer = output_buffer.class.new(output_buffer) end controller.write_fragment(name, fragment, options) end |