Method: ActiveResource::Errors#from_xml

Defined in:
lib/active_resource/validations.rb

#from_xml(xml, save_cache = false) ⇒ Object

Grabs errors from an XML response.



74
75
76
77
# File 'lib/active_resource/validations.rb', line 74

def from_xml(xml, save_cache = false)
  array = Array.wrap(Hash.from_xml(xml)["errors"]["error"]) rescue []
  from_array array, save_cache
end