aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/to_query.rb
diff options
context:
space:
mode:
authorbrainopia <brainopia@evilmartians.com>2011-09-16 22:59:16 +0400
committerbrainopia <brainopia@evilmartians.com>2011-09-16 22:59:16 +0400
commit3a04e370e4cc016bb7b59fe6bb704e4ca37d62f3 (patch)
tree2a5ac65d1b3ee91e0abff8226e7efdf3b6e80af6 /activesupport/lib/active_support/core_ext/object/to_query.rb
parente314b3ff6d074ee0ea4c314e6ca1083469780449 (diff)
downloadrails-3a04e370e4cc016bb7b59fe6bb704e4ca37d62f3.tar.gz
rails-3a04e370e4cc016bb7b59fe6bb704e4ca37d62f3.tar.bz2
rails-3a04e370e4cc016bb7b59fe6bb704e4ca37d62f3.zip
Fix Hash#to_query edge case with html_safe string on 1.8 ruby
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/to_query.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/to_query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/to_query.rb b/activesupport/lib/active_support/core_ext/object/to_query.rb
index 3f1540f685..5d5fcf00e0 100644
--- a/activesupport/lib/active_support/core_ext/object/to_query.rb
+++ b/activesupport/lib/active_support/core_ext/object/to_query.rb
@@ -7,7 +7,7 @@ class Object
# Note: This method is defined as a default implementation for all Objects for Hash#to_query to work.
def to_query(key)
require 'cgi' unless defined?(CGI) && defined?(CGI::escape)
- "#{CGI.escape(key.to_s)}=#{CGI.escape(to_param.to_s)}"
+ "#{CGI.escape(key.to_param)}=#{CGI.escape(to_param.to_s)}"
end
end