After upgrading from 3.0.7 to 3.0.8, I get the following error:
activesupport (3.0.8) lib/active_support/core_ext/string/ output_safety.rb:114:in `slice!' actionpack (3.0.8) lib/action_view/helpers/cache_helper.rb:56:in `fragment_for' actionpack (3.0.8) lib/action_view/helpers/cache_helper.rb:38:in `cache' app/views/customers/index.html.erb:18:in `_app_views_customers_index_html_erb__218860319__625647498_0' ...
As far as I can tell, the method `fragment_for` in `CacheHelper` is calling `slice!` on a `SafeBuffer` object.
def fragment_for(name = {}, options = nil, &block) #:nodoc: if controller.fragment_exist?(name, options) controller.read_fragment(name, options) else # VIEW TODO: Make #capture usable outside of ERB # This dance is needed because Builder can't use capture pos = output_buffer.length yield fragment = output_buffer.slice!(pos..-1) # PROBLEM controller.write_fragment(name, fragment, options) end end
However, `slice!` is also one of the unsafe methods defined in `ActiveSupport::SafeBuffer`. Therefore an exception is thrown.
Best regards, Christoph Schiessl