thecore_api 1.4.9 → 1.5.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bee9108eb88ab9fe17f47ad56f2d55ce2f91a94a053edb6fdc2de6008001bea9
|
4
|
+
data.tar.gz: b10c71bd8070afe6ed5b6819b0574adbf2e525db23c5c935b0921137df18d6d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd1414f9643019e314678b704a94812abf938fa0d18bfa9a7098e2fea758a334df0e23d478506345c59d0bdbdc998a447ae0f0e2ab5ba4ffe9128069ca116f5f
|
7
|
+
data.tar.gz: 4b34c35d419906fbdf7c3836e834861cf50cbf6febe233ce9c70fba65534c31520804b9fc525ce3d8638b7d118fd1f12fec6d044487cc76639f658d51fb6aa7e
|
@@ -28,9 +28,9 @@ class Api::V1::BaseController < ActionController::API
|
|
28
28
|
rescue_from ActiveRecord::StatementInvalid, with: :unauthenticated!
|
29
29
|
rescue_from ActiveRecord::RecordInvalid, with: :invalid!
|
30
30
|
rescue_from CanCan::AccessDenied, with: :unauthorized!
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
rescue_from ActiveRecord::RecordNotFound, with: :not_found!
|
32
|
+
rescue_from NameError, with: :not_found!
|
33
|
+
rescue_from NoMethodError, with: :not_found!
|
34
34
|
|
35
35
|
attr_accessor :current_user
|
36
36
|
|
@@ -47,10 +47,10 @@ class Api::V1::InfoController < Api::V1::BaseController
|
|
47
47
|
# Only application record descendants to have a clean schema
|
48
48
|
pivot[model][:associations] ||= {
|
49
49
|
has_many: d.reflect_on_all_associations(:has_many).map { |a|
|
50
|
-
a.name if ((a.options[:class_name].presence || a.name).to_s.classify.constantize.new.is_a? ApplicationRecord)
|
50
|
+
a.name if (((a.options[:class_name].presence || a.name).to_s.classify.constantize.new.is_a? ApplicationRecord) rescue false)
|
51
51
|
}.compact,
|
52
52
|
belongs_to: d.reflect_on_all_associations(:belongs_to).map { |a|
|
53
|
-
a.name if ((a.options[:class_name].presence || a.name).to_s.classify.constantize.new.is_a? ApplicationRecord)
|
53
|
+
a.name if (((a.options[:class_name].presence || a.name).to_s.classify.constantize.new.is_a? ApplicationRecord) rescue false)
|
54
54
|
}.compact
|
55
55
|
}
|
56
56
|
end
|
data/lib/thecore_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.0.
|
164
|
+
rubygems_version: 3.0.6
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Taris API.
|