Use safe_concat instead of trying to html_safe! what might be a frozen string

上级 d2e7c1b9
......@@ -36,8 +36,8 @@ 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).html_safe!)
if fragment_exist?(name, options)
buffer.safe_concat(read_fragment(name, options))
else
pos = buffer.length
block.call
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册