Permalink
Browse files

to_str works here

  • Loading branch information...
1 parent b99914c commit b3d32a5b28e96cda5ef66eb165325e08c57bdc74 @jeremy jeremy committed Mar 15, 2010
View
2 actionpack/lib/action_controller/caching/fragments.rb
@@ -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
View
6 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -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

0 comments on commit b3d32a5

Please sign in to comment.