diff options
Diffstat (limited to 'activeresource/lib/active_resource/validations.rb')
-rw-r--r-- | activeresource/lib/active_resource/validations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb index a19e0d0ac9..026d81e44a 100644 --- a/activeresource/lib/active_resource/validations.rb +++ b/activeresource/lib/active_resource/validations.rb @@ -27,7 +27,7 @@ module ActiveResource # Grabs errors from a json response. def from_json(json, save_cache = false) - array = ActiveSupport::JSON.decode(json)['errors'] rescue [] + array = Array.wrap(ActiveSupport::JSON.decode(json)['errors']) rescue [] from_array array, save_cache end |