thecore_api 1.4.5 → 1.4.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 425d080e2569d8b3c6a5890b26f03e5c50fdbf08fd387719b114af3d8d72ead4
4
- data.tar.gz: 0def430ef68a0bae6f63fd3f8ed434b5111ae62bd246f79f38d44b5a0fce5576
3
+ metadata.gz: 664127d455cafb67edf696bb0d5a793414cfdac234f558b6736d4f1f472b2f6c
4
+ data.tar.gz: 1c47bcd0a324d4956a88547c70edee90648f0e43af50c26a83d67d271a30a00f
5
5
  SHA512:
6
- metadata.gz: ff82f98af88ed60a78e1c4996636a8074f0d95462d77dfad0c856f3c4cacb399324ee43c2007b35a9345fe9db5e6bd7475e568ea1045d4239661762e2314cb24
7
- data.tar.gz: 209de01dbae0e5683609c75c19364f3f4149f370f98be9eeb21bf926de0772e909f194cd5e7f556f07088b9cf7989e581808a327266e5674762216ff978adcd3
6
+ metadata.gz: 246d14ab51587d5895b2001a4f3e341f3ec0918d872682537d023b371cb5cbe2a2ce057daff71bd4da6ce4f84c9679b6dbe023afc687d23feb7811c1016a8a98
7
+ data.tar.gz: c4a0cf0590350dbfab746a3b877706785e2b087dc197da85774f29d2d998c893b53615e7e120aa7661cd5b0f7b8d917c44c95dece3134a8d40cb22ebe4612b17
@@ -268,7 +268,7 @@ class Api::V1::BaseController < ActionController::API
268
268
 
269
269
  def find_model path=nil
270
270
  # Find the name of the model from controller
271
- path ||= params[:path].split("/").first
271
+ path ||= (params[:path].split("/").first rescue nil)
272
272
  @model = (path.presence || controller_path).classify.constantize rescue controller_name.classify.constantize rescue nil
273
273
  end
274
274
 
@@ -1,3 +1,3 @@
1
1
  module ThecoreApi
2
- VERSION = "1.4.5".freeze
2
+ VERSION = "1.4.6".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni