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: 0aa7ce92de3619dbf41157fe23c11f62c5f048f9e4edb9d03edc6798dabe0cf7
4
- data.tar.gz: 59107e400d1b8232e04d92020fda0fe7481812e7a1d643433e9e200f78996072
3
+ metadata.gz: bee9108eb88ab9fe17f47ad56f2d55ce2f91a94a053edb6fdc2de6008001bea9
4
+ data.tar.gz: b10c71bd8070afe6ed5b6819b0574adbf2e525db23c5c935b0921137df18d6d7
5
5
  SHA512:
6
- metadata.gz: acdc39e15841ed237a28fa59545708d9613da256a5ab8f50604c58b0bab6d386eb8fd6e4cf8878432ba35f60267e51638de5c54d6f5a10fd341a640b04d17298
7
- data.tar.gz: 7a36e4dc9955463c962120ac79300dc48f377b7926b352ed9d846a33ebfe79b1f6a77c810c219a5ecf354668a13ea63b8efe556a81c0581ba56d613a01d0419c
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
- # rescue_from ActiveRecord::RecordNotFound, with: :not_found!
32
- # rescue_from NameError, with: :not_found!
33
- # rescue_from NoMethodError, with: :not_found!
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
@@ -1,3 +1,3 @@
1
1
  module ThecoreApi
2
- VERSION = "1.4.9".freeze
2
+ VERSION = "1.5.0".freeze
3
3
  end
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.9
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-03 00:00:00.000000000 Z
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.1
164
+ rubygems_version: 3.0.6
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Taris API.