aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-06-12 15:03:24 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2011-06-12 15:32:46 +0100
commit1fa059cd017c134499835593ba29620c4cd7358c (patch)
tree3e8ff090c466a8023856c59cea5b03925075c443 /activesupport/lib/active_support
parentcd99784d99f1700b9af05c5f01e00e988c8557d5 (diff)
downloadrails-1fa059cd017c134499835593ba29620c4cd7358c.tar.gz
rails-1fa059cd017c134499835593ba29620c4cd7358c.tar.bz2
rails-1fa059cd017c134499835593ba29620c4cd7358c.zip
Define ActiveSupport#to_param as to_str - closes #1663
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb4
1 files changed, 4 insertions, 0 deletions
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