aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/validations.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/validations.rb')
-rw-r--r--activeresource/lib/active_resource/validations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb
index d4d282e273..67b69fa505 100644
--- a/activeresource/lib/active_resource/validations.rb
+++ b/activeresource/lib/active_resource/validations.rb
@@ -93,9 +93,9 @@ module ActiveResource
# content-type of the error-block received
def load_remote_errors(remote_errors, save_cache = false ) #:nodoc:
case remote_errors.response['Content-Type']
- when 'application/xml'
+ when /xml/
errors.from_xml(remote_errors.response.body, save_cache)
- when 'application/json'
+ when /json/
errors.from_json(remote_errors.response.body, save_cache)
end
end