Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

to_str works here

  • Loading branch information...
commit b3d32a5b28e96cda5ef66eb165325e08c57bdc74 1 parent b99914c
Jeremy Kemper jeremy authored
2  actionpack/lib/action_controller/caching/fragments.rb
View
@@ -54,7 +54,7 @@ def write_fragment(key, content, options = nil)
self.class.benchmark "Cached fragment miss: #{key}" do
key = fragment_cache_key(key)
- 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
6 activesupport/lib/active_support/core_ext/string/output_safety.rb
View
@@ -105,12 +105,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
Please sign in to comment.
Something went wrong with that request. Please try again.