From 54c393f5fa2dfd5ff5866cba74e7179f493732df Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 20 Sep 2006 09:34:29 +0000 Subject: Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist until Rails 2.0 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index fdc5a165b0..de67b0b00d 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -77,14 +77,19 @@ module ActiveSupport #:nodoc: end module ClassMethods - def create_from_xml(xml) + def from_xml(xml) # TODO: Refactor this into something much cleaner that doesn't rely on XmlSimple undasherize_keys(typecast_xml_value(XmlSimple.xml_in(xml, 'forcearray' => false, 'forcecontent' => true, 'keeproot' => true, 'contentkey' => '__content__') - )) + )) + end + + def create_from_xml(xml) + ActiveSupport::Deprecation.warn("Hash.create_from_xml has been renamed to Hash.from_xml", caller) + from_xml(xml) end private -- cgit v1.2.3