elocal_api_support 0.1.9 → 0.1.10

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: 12310ae89e5df33b87cb16516d5347a6d674c294
4
- data.tar.gz: 9c3b01f7b39cb561fb860a888e4d1b7f0ee17377
3
+ metadata.gz: c98a2a243cd39c3759893fad75b2a3ba374ea396
4
+ data.tar.gz: 2d66516b24e376be105a557b04cbe9537a5703f1
5
5
  SHA512:
6
- metadata.gz: 291c2c2c1beac59b296f477eca2fb43f93c66fbae008c53da0afc661f9bc3fdef816ebedeaa6fa41cd95a77b2a447ada4e94d15948c8f395b8cc69a328f19f10
7
- data.tar.gz: 2ab22283710e09c9252271ad66c2d3e3c6cc97f2e505d3de3831d2f66c86661cb12eaa66dd7b4d7a29a55c2667a40adcd9ce2d8cddfd88a2e6d56843a5eb430b
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
- render json: {} # record not found is ok for destroy
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
@@ -1,3 +1,3 @@
1
1
  module ElocalApiSupport
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  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.9
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-07-01 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport