human_error 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/human_error/rescuable_resource.rb +3 -1
- data/lib/human_error/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95b89af102ac1e3a09aa191a6f1ff89c559d6f30
|
4
|
+
data.tar.gz: bfbc3350e58c6fc50e8f84c44e6cfaf148902c60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3682e282875e029033df7d72421d950c40d0e2b2b7688859de50178ac28ddb3f0a16f945788c8831a564e05b634f67e49b1ced1c897334b7c721e291d96bbaa0
|
7
|
+
data.tar.gz: 27ab2ccf59ac7d6a22b5463fd805f6c4921f701f68a319b56daea771cb0fdd27bd10f04a549903f0b7c4c75d0b2aaa61e91412f9430fbd55efa8885cc21a3648
|
@@ -24,10 +24,12 @@ module RescuableResource
|
|
24
24
|
|
25
25
|
if from.include? 'not_found'
|
26
26
|
rescue_from HumanError::Errors::ResourceNotFoundError do |e|
|
27
|
+
resource_id = e.resource_id.is_a?(Array) ? e.resource_id : [e.resource_id]
|
28
|
+
|
27
29
|
error = lookup_library.fetch(
|
28
30
|
'ResourceNotFoundError',
|
29
31
|
resource_name: e.resource_name,
|
30
|
-
resource_id:
|
32
|
+
resource_id: resource_id,
|
31
33
|
action: action_name)
|
32
34
|
|
33
35
|
render json: error,
|
data/lib/human_error/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: human_error
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jfelchner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|