model_driven_api 2.5.2 → 2.5.3

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: df49bbe3e54bdd08520d243513d0894a8d7551e10076cd0980f3608e79d09d79
4
- data.tar.gz: c3707cec47cf298991d0dcfb142951bcb4b19e18fb336064c5a95cf77b415381
3
+ metadata.gz: 8698a1f65e7b3cae8a9d27c3c610435b11d23102f86e90719b45b1a480628279
4
+ data.tar.gz: bddef848a94fd0a23b555f44e7596606fc1ed630afcd3d91179bc8d6ac0fe601
5
5
  SHA512:
6
- metadata.gz: 82de99741a6e6e0447b380a920e615a6f68d33fde36a0ccabcc5357a9343271976e6b2c8287a0ea35d06f5992f96befbfe5b550e3d1ca8361a4f7794bff4e6eb
7
- data.tar.gz: 7db2e1d3d203f2a72e8f3958fca289c0f8d6b8a3437b7bb411a71f26e9b9b8c5781a8a6cd2ef7234d3fdd7f246691325f2b1076423b46bc681b7ccb1897405df
6
+ metadata.gz: 483e239527128317d747a7f2621379b35d7ed0fe24947c135d5e13154364e530baf9bf63a022e56dd0ca70196cc3f21a13acdeeaf4496408e698afab075fee15
7
+ data.tar.gz: 7396686c68fbfd721ed82728e3d6d2de9c6e2170362a9432b24da98b1cff3c8667d822a187f6b9d2cdc1f0509fc6437cceb65e795a444f161d93d320572a57d5
@@ -61,13 +61,12 @@ class Api::V2::ApplicationController < ActionController::API
61
61
  end
62
62
 
63
63
  def create
64
- # Custom Action
65
- status, result, status_number = check_for_custom_action
66
- return render json: result, status: (status_number.presence || 200) if status == true
67
-
68
64
  # Normal Create Action
69
65
  @record = @model.new(@body)
70
66
  authorize! :create, @record
67
+ # Custom Action
68
+ status, result, status_number = check_for_custom_action
69
+ return render json: result, status: (status_number.presence || 200) if status == true
71
70
  # Keeping this automation can be too dangerous and lead to unpredicted results
72
71
  # TODO: Remove it
73
72
  # @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.2
4
+ version: 2.5.3
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-06-01 00:00:00.000000000 Z
11
+ date: 2022-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons