model_driven_api 3.2.3 → 3.2.4
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: 010f1acfbe42371a8465ba5eeae1f6a5cc0d8c7d5891c30b52ed2c9056bfd7d0
|
4
|
+
data.tar.gz: fb81afbec2d0ce91297c68b212a97e213c0b0d7cf15630c82af753f5511ec1f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01941ccd88639849a80e1068266b083911915793f0513835e6caf2c61b718d7c4c80d0c57c4a59f25f4a64ddf85a728d18fccada0cf7e53e813b39293b26b339'
|
7
|
+
data.tar.gz: e9243797670a8dba2dbd87a2e79571dbb5e39dea8fa26379934a08fe74137db7bb053fc73bbb63d811962397bff5e4cb64c11fdf7b65b5abcfe363827a7185df
|
@@ -53,7 +53,7 @@ class Api::V2::ApplicationController < ActionController::API
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def show
|
56
|
-
authorize! :show, @record_id
|
56
|
+
authorize! :show, @record_id.presence || @model
|
57
57
|
|
58
58
|
# Custom Show Action
|
59
59
|
status, result, status_number = check_for_custom_action
|
@@ -66,7 +66,8 @@ class Api::V2::ApplicationController < ActionController::API
|
|
66
66
|
|
67
67
|
def create
|
68
68
|
# Normal Create Action
|
69
|
-
|
69
|
+
Rails.logger.debug("Creating a new record #{@record}")
|
70
|
+
authorize! :create, @record.presence || @model
|
70
71
|
# Custom Action
|
71
72
|
status, result, status_number = check_for_custom_action
|
72
73
|
return render json: result, status: (status_number.presence || 200) if status == true
|
@@ -79,7 +80,7 @@ class Api::V2::ApplicationController < ActionController::API
|
|
79
80
|
end
|
80
81
|
|
81
82
|
def update
|
82
|
-
authorize! :update, @record
|
83
|
+
authorize! :update, @record.presence || @model
|
83
84
|
|
84
85
|
# Custom Action
|
85
86
|
status, result, status_number = check_for_custom_action
|
@@ -102,7 +103,7 @@ class Api::V2::ApplicationController < ActionController::API
|
|
102
103
|
end
|
103
104
|
|
104
105
|
def destroy
|
105
|
-
authorize! :destroy, @record
|
106
|
+
authorize! :destroy, @record.presence || @model
|
106
107
|
|
107
108
|
# Custom Action
|
108
109
|
status, result, status_number = check_for_custom_action
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_driven_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|