lib/active_resource/validations.rb in activeresource-6.1.1 vs lib/active_resource/validations.rb in activeresource-6.1.2

- old
+ new

@@ -55,18 +55,18 @@ decoded = ActiveSupport::JSON.decode(json) || {} rescue {} if decoded.kind_of?(Hash) && (decoded.has_key?("errors") || decoded.empty?) errors = decoded["errors"] || {} if errors.kind_of?(Array) # 3.2.1-style with array of strings - ActiveSupport::Deprecation.warn("Returning errors as an array of strings is deprecated.") + ActiveResource.deprecator.warn("Returning errors as an array of strings is deprecated.") from_array errors, save_cache else # 3.2.2+ style from_hash errors, save_cache end else # <3.2-style respond_with - lacks 'errors' key - ActiveSupport::Deprecation.warn('Returning errors as a hash without a root "errors" key is deprecated.') + ActiveResource.deprecator.warn('Returning errors as a hash without a root "errors" key is deprecated.') from_hash decoded, save_cache end end # Grabs errors from an XML response.