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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf40c658d11ca2608a07837a6722d0b5ae682e53
4
- data.tar.gz: 3c7424f0017c0e6377746a76565537dcbd547488
3
+ metadata.gz: 95b89af102ac1e3a09aa191a6f1ff89c559d6f30
4
+ data.tar.gz: bfbc3350e58c6fc50e8f84c44e6cfaf148902c60
5
5
  SHA512:
6
- metadata.gz: c73a0ecc4dfaaf4648bb280dbc8d6752e6ed177fa9e3ec78c538b04c0a75aa3c79f159e9715983f616731e39a100d6cbc4c1b593145da7f9269fcf56a40ca14b
7
- data.tar.gz: 6d537388cdb3f30173203336de4a45cffb809221c7095fbfe73f49af43d1aa095cb93c807a48a1150819eab20a5651aeb0dd827741fe290231930d019ca2a5bd
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: e.resource_id,
32
+ resource_id: resource_id,
31
33
  action: action_name)
32
34
 
33
35
  render json: error,
@@ -1,3 +1,3 @@
1
1
  class HumanError
2
- VERSION = '1.11.0'
2
+ VERSION = '1.12.0'
3
3
  end
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.11.0
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-28 00:00:00.000000000 Z
11
+ date: 2014-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec