module ActiveResource::Validations

@private

Public Instance Methods

load_remote_errors(remote_errors, save_cache = false) click to toggle source

Loads the set of remote errors into the object's Errors based on the content-type of the error-block received.

Calls superclass method
# File lib/esp/extensions/active_resource/validations.rb, line 6
def load_remote_errors(remote_errors, save_cache = false)
  if self.class.format == ActiveResource::Formats::JsonAPIFormat
    errors.from_json_api(remote_errors.response.body, save_cache)
  elsif self.class.format == ActiveResource::Formats[:json]
    super
  end
end