model_driven_api 2.5.1 → 2.5.2
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 +4 -4
- data/app/controllers/api/v2/application_controller.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df49bbe3e54bdd08520d243513d0894a8d7551e10076cd0980f3608e79d09d79
|
4
|
+
data.tar.gz: c3707cec47cf298991d0dcfb142951bcb4b19e18fb336064c5a95cf77b415381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82de99741a6e6e0447b380a920e615a6f68d33fde36a0ccabcc5357a9343271976e6b2c8287a0ea35d06f5992f96befbfe5b550e3d1ca8361a4f7794bff4e6eb
|
7
|
+
data.tar.gz: 7db2e1d3d203f2a72e8f3958fca289c0f8d6b8a3437b7bb411a71f26e9b9b8c5781a8a6cd2ef7234d3fdd7f246691325f2b1076423b46bc681b7ccb1897405df
|
@@ -61,14 +61,13 @@ class Api::V2::ApplicationController < ActionController::API
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def create
|
64
|
-
@record = @model.new(@body)
|
65
|
-
authorize! :create, @record
|
66
|
-
|
67
64
|
# Custom Action
|
68
65
|
status, result, status_number = check_for_custom_action
|
69
66
|
return render json: result, status: (status_number.presence || 200) if status == true
|
70
67
|
|
71
68
|
# Normal Create Action
|
69
|
+
@record = @model.new(@body)
|
70
|
+
authorize! :create, @record
|
72
71
|
# Keeping this automation can be too dangerous and lead to unpredicted results
|
73
72
|
# TODO: Remove it
|
74
73
|
# @record.user_id = current_user.id if @model.column_names.include? "user_id"
|
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: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|