Skip to content
This repository
Browse code

fixed CacheHelper to properly support html_safe output buffers

  • Loading branch information...
commit c476a6be78c27a2e92e30f0e46c6dcbbbaabc419 1 parent 9a4d2b2
Lauri Hahne authored July 15, 2011
2  actionpack/lib/action_view/helpers/cache_helper.rb
@@ -53,7 +53,7 @@ def fragment_for(name = {}, options = nil, &block) #:nodoc:
53 53
           # This dance is needed because Builder can't use capture
54 54
           pos = output_buffer.length
55 55
           yield
56  
-          if output_buffer.is_a?(ActionView::OutputBuffer)
  56
+          if output_buffer.html_safe?
57 57
             safe_output_buffer = output_buffer.to_str
58 58
             fragment = safe_output_buffer.slice!(pos..-1)
59 59
             self.output_buffer = ActionView::OutputBuffer.new(safe_output_buffer)

0 notes on commit c476a6b

Please sign in to comment.
Something went wrong with that request. Please try again.