diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 9 |
1 files changed, 7 insertions, 2 deletions
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 |