aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-23 15:26:32 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-23 15:26:32 -0800
commit9f5ab945b7118a317a12bd46c73d24575f31ce3f (patch)
tree2a1a48663005fb166be05272763124c21ffc0aac /activesupport/lib/active_support/core_ext/object
parente931012287df0bca83cae04d95c2e0835ae08758 (diff)
downloadrails-9f5ab945b7118a317a12bd46c73d24575f31ce3f.tar.gz
rails-9f5ab945b7118a317a12bd46c73d24575f31ce3f.tar.bz2
rails-9f5ab945b7118a317a12bd46c73d24575f31ce3f.zip
Lazy-require XmlSimple. Move CGI require to object conversions where it's actually used.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object')
-rw-r--r--activesupport/lib/active_support/core_ext/object/conversions.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/conversions.rb b/activesupport/lib/active_support/core_ext/object/conversions.rb
index ad752f0fc5..1dee171ec4 100644
--- a/activesupport/lib/active_support/core_ext/object/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/object/conversions.rb
@@ -1,3 +1,5 @@
+require 'cgi'
+
class Object
# Alias of <tt>to_s</tt>.
def to_param
@@ -11,4 +13,4 @@ class Object
def to_query(key)
"#{CGI.escape(key.to_s)}=#{CGI.escape(to_param.to_s)}"
end
-end \ No newline at end of file
+end