diff options
-rw-r--r-- | actionpack/lib/action_controller/caching/fragments.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/output_safety.rb | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 841e64ecaf..89787727bd 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -54,7 +54,7 @@ module ActionController #:nodoc: 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 diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index af46ae10d6..9a7c520e75 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -89,12 +89,8 @@ module ActiveSupport #:nodoc: 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 |