ocean-rails 1.22.2 → 1.22.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/ocean_resource_controller.rb +7 -7
- data/lib/ocean/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3428a7d30c57bcd52d9072e7b79861f8a2a65714
|
4
|
+
data.tar.gz: 3297e0355f6c5b20953c9a5598dda840bc11dfeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc596c4d98a1c062da61ae6f63c8b711606b2d599fc73f33eecf8169feb963472ae694f1be83f31c65116c4c6304d804326e90586f42537b342ab67c37b1b069
|
7
|
+
data.tar.gz: aa885f87efa2b93ac915c6c69ab8fe96ef9d814e279d9694d9d2468c1afe283e602cf92d29d3cf89ac8929a0acff7795dec9b667b1659a1ba4c4921461f69d6c
|
@@ -19,19 +19,19 @@ module Ocean
|
|
19
19
|
|
20
20
|
included do
|
21
21
|
if defined? ActiveRecord
|
22
|
-
rescue_from ActiveRecord::RecordNotUnique,
|
23
|
-
ActiveRecord::StatementInvalid,
|
24
|
-
OceanDynamo::RecordNotUnique do |x|
|
22
|
+
rescue_from "ActiveRecord::RecordNotUnique",
|
23
|
+
"ActiveRecord::StatementInvalid",
|
24
|
+
"OceanDynamo::RecordNotUnique" do |x|
|
25
25
|
render_api_error 422, "Resource not unique"
|
26
26
|
end
|
27
27
|
|
28
|
-
rescue_from ActiveRecord::StaleObjectError,
|
29
|
-
OceanDynamo::StaleObjectError do |x|
|
28
|
+
rescue_from "ActiveRecord::StaleObjectError",
|
29
|
+
"OceanDynamo::StaleObjectError" do |x|
|
30
30
|
render_api_error 409, "Stale #{x.record.class.name}"
|
31
31
|
end
|
32
32
|
|
33
|
-
rescue_from ActiveRecord::RecordInvalid,
|
34
|
-
OceanDynamo::RecordInvalid do |x|
|
33
|
+
rescue_from "ActiveRecord::RecordInvalid",
|
34
|
+
"OceanDynamo::RecordInvalid" do |x|
|
35
35
|
render_validation_errors x.record, except: ocean_resource_controller_no_validation_errors_on
|
36
36
|
end
|
37
37
|
end
|
data/lib/ocean/version.rb
CHANGED