Skip to content

Commit

Permalink
to_str works here
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Mar 15, 2010
1 parent ed19955 commit c937da9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/caching/fragments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c937da9

Please sign in to comment.