Module: ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods
- Defined in:
- lib/active_support/core_ext/hash/conversions.rb
Instance Method Summary collapse
Instance Method Details
#create_from_xml(xml) ⇒ Object
137 138 139 140 |
# File 'lib/active_support/core_ext/hash/conversions.rb', line 137 def create_from_xml(xml) ActiveSupport::Deprecation.warn("Hash.create_from_xml has been renamed to Hash.from_xml", caller) from_xml(xml) end |
#from_xml(xml) ⇒ Object
127 128 129 130 131 132 133 134 135 |
# File 'lib/active_support/core_ext/hash/conversions.rb', line 127 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_string(xml, 'forcearray' => false, 'forcecontent' => true, 'keeproot' => true, 'contentkey' => '__content__') )) end |