diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-11 17:32:26 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-11 17:43:29 -0800 |
commit | 47bc138fc1d9ddafab8e4cf9cac8865f2092c003 (patch) | |
tree | 65fb223886d6eeb8bc364971d13050a6f1252cca /actionpack | |
parent | 1f6c5677ad18a2d49866100b043b82bd030875d4 (diff) | |
download | rails-47bc138fc1d9ddafab8e4cf9cac8865f2092c003.tar.gz rails-47bc138fc1d9ddafab8e4cf9cac8865f2092c003.tar.bz2 rails-47bc138fc1d9ddafab8e4cf9cac8865f2092c003.zip |
Write strings to fragment cache, not outputbuffers
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/caching/fragments.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 00a7f034d3..bb5ff95a67 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -41,7 +41,9 @@ module ActionController #:nodoc: else pos = buffer.length block.call - write_fragment(name, buffer[pos..-1], options) + content = buffer[pos..-1] + content = content.as_str if content.respond_to?(:as_str) + write_fragment(name, content, options) end else block.call |