ocean-rails 1.21.0 → 1.22.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: bcf40f66a966f7a784159d77e4848cea45371325
4
- data.tar.gz: bdca4988212512230799e74df574d7e98d60c63e
3
+ metadata.gz: 0863495cb9e8b69a7d6c5bd8385bd1652f13d9a1
4
+ data.tar.gz: da30870c277cfb5ad6709dfb89a89bbdc6d37980
5
5
  SHA512:
6
- metadata.gz: 6ee6d36b30ab877536cf485810881a2441400f0b7391ef360f4f47409bd2c443bbe431acb9f47257ca855b1c635c8dd2c0dd0c5b1b34577477041cf8789b7b66
7
- data.tar.gz: 679e1013d4d9898aaefd98ef3e2003da3236eea143e2f130e2e375a9fe7ea99a42d51ffa722a6b766f2c7f8bf6b533b16f4fc0a3a21c86d32a79b350a392a7a9
6
+ metadata.gz: f1d51931c6932ab99fa294c5c6fcc0a427232707fbae00a63d558de119c2c3df8869626e2eb83c41b83f6553486214ba4add13aa483e5f8e65b1642e1c0c09a1
7
+ data.tar.gz: 1800dea3ebee9e095ab9461d0a565878559b6407c8c028f9f5b952dadb960bb820cacdfafe51eb38c2deec406e035d5cb1331a1233b4a9a691492f29ba3f5510
@@ -20,15 +20,18 @@ module Ocean
20
20
  included do
21
21
  if defined? ActiveRecord
22
22
  rescue_from ActiveRecord::RecordNotUnique,
23
- ActiveRecord::StatementInvalid do |x|
23
+ ActiveRecord::StatementInvalid,
24
+ OceanDynamo::RecordNotSaved do |x|
24
25
  render_api_error 422, "Resource not unique"
25
26
  end
26
27
 
27
- rescue_from ActiveRecord::StaleObjectError do |x|
28
+ rescue_from ActiveRecord::StaleObjectError,
29
+ OceanDynamo::RecordInConflict do |x|
28
30
  render_api_error 409, "Stale #{x.record.class.name}"
29
31
  end
30
32
 
31
- rescue_from ActiveRecord::RecordInvalid do |x|
33
+ rescue_from ActiveRecord::RecordInvalid,
34
+ OceanDynamo::RecordInvalid do |x|
32
35
  render_validation_errors x.record, except: ocean_resource_controller_no_validation_errors_on
33
36
  end
34
37
  end
data/lib/ocean/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "1.21.0"
2
+ VERSION = "1.22.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson