From 47bc138fc1d9ddafab8e4cf9cac8865f2092c003 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 11 Mar 2010 17:32:26 -0800 Subject: Write strings to fragment cache, not outputbuffers --- activesupport/lib/active_support/core_ext/string/output_safety.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/string/output_safety.rb') 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 c55b471986..3a49cd288b 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -89,8 +89,12 @@ module ActiveSupport #:nodoc: self end + def as_str + ''.replace(self) + end + def to_yaml - "".replace(self).to_yaml + as_str.to_yaml end end end -- cgit v1.2.3