elocal_api_support 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elocal_api_support/actions/destroy.rb +6 -1
- data/lib/elocal_api_support/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: c98a2a243cd39c3759893fad75b2a3ba374ea396
|
|
4
|
+
data.tar.gz: 2d66516b24e376be105a557b04cbe9537a5703f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a99139191ae1615aaf558aa2c0be4ed3bdff81c764eda8d5b6fc17b128b3aa0714a28e91bd33daf046d00756aebeac3e2ef3cfb9e0a59ee974dcc4f435ede299
|
|
7
|
+
data.tar.gz: 10942ec1a81fa98d12c28f36100966aff03aaef4f5fd31724f0946c4218a23483f409c9d2708fad56be6621211063fba95853aa0d0863f55712b4f9d5ef90ddb
|
|
@@ -2,13 +2,18 @@ module ElocalApiSupport
|
|
|
2
2
|
module Actions
|
|
3
3
|
module Destroy
|
|
4
4
|
def destroy
|
|
5
|
+
# record not found is ok for destroy
|
|
6
|
+
render json: { errors: "Cannot retrieve record: #{params[:id]}" } and return \
|
|
7
|
+
if lookup_object.nil?
|
|
8
|
+
|
|
5
9
|
if lookup_object.destroy
|
|
6
10
|
render json: lookup_object
|
|
7
11
|
else
|
|
8
12
|
render json: { errors: "Failed to destroy #{lookup_object}" }, status: 500
|
|
9
13
|
end
|
|
10
14
|
rescue ActiveRecord::RecordNotFound
|
|
11
|
-
|
|
15
|
+
# record not found is ok for destroy
|
|
16
|
+
render json: { errors: "Cannot retrieve record: #{params[:id]}" }
|
|
12
17
|
end
|
|
13
18
|
end
|
|
14
19
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elocal_api_support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rob Di Marco
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|