提交 c937da9e 编写于 作者: J Jeremy Kemper

to_str works here

上级 ed199554
......@@ -54,7 +54,7 @@ def write_fragment(key, content, options = nil)
key = fragment_cache_key(key)
instrument_fragment_cache :write_fragment, key do
content = content.html_safe.as_str if content.respond_to?(:html_safe)
content = content.html_safe.to_str if content.respond_to?(:html_safe)
cache_store.write(key, content, options)
end
content
......
......@@ -89,12 +89,8 @@ def to_s
self
end
def as_str
''.replace(self)
end
def to_yaml(*args)
as_str.to_yaml(*args)
to_str.to_yaml(*args)
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册