From 1fa059cd017c134499835593ba29620c4cd7358c Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 12 Jun 2011 15:03:24 +0100 Subject: Define ActiveSupport#to_param as to_str - closes #1663 --- activesupport/lib/active_support/core_ext/string/output_safety.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib/active_support/core_ext') 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 20e40fe40f..8b8aa2b380 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -103,6 +103,10 @@ module ActiveSupport #:nodoc: self end + def to_param + to_str + end + def encode_with(coder) coder.represent_scalar nil, to_str end -- cgit v1.2.3