lib/rest/api/client.rb in rest-api-client-0.1.7 vs lib/rest/api/client.rb in rest-api-client-0.1.8

- old
+ new

@@ -46,11 +46,11 @@ return false unless valid? begin update_attributes(perform_post path, get_params) self rescue RestApiClient::ModelErrorsException => e - @errors = e.errors + errors.add(:rest_api_error, e.errors) raise e end end def save @@ -58,11 +58,11 @@ begin update_attributes(perform_post path, get_params) self rescue RestApiClient::ModelErrorsException => e - @errors = e.errors + errors.add(:rest_api_error, e.errors) return false end end def delete @@ -72,20 +72,20 @@ def update begin update_attributes(perform_put "#{path}/#{id}", get_params) self rescue RestApiClient::ModelErrorsException => e - @errors = e.errors + errors.add(:rest_api_error, e.errors) return false end end def update! begin update_attributes(perform_put "#{path}/#{id}", get_params) self rescue RestApiClient::ModelErrorsException => e - @errors = e.errors + errors.add(:rest_api_error, e.errors) raise e end end def perform_get(path, args = {}, headers = {})