model_driven_api 2.5.1 → 2.5.2

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: 73cfe08fc31b7f30f5fa957336815aac4a3e50ecc087d112e229788726544367
4
- data.tar.gz: 94627de57118c1469e0831c4bd76f6f777ead4f75954108dc27578d1754e6cff
3
+ metadata.gz: df49bbe3e54bdd08520d243513d0894a8d7551e10076cd0980f3608e79d09d79
4
+ data.tar.gz: c3707cec47cf298991d0dcfb142951bcb4b19e18fb336064c5a95cf77b415381
5
5
  SHA512:
6
- metadata.gz: e1563f942781fa8f6f42421b6140cc2696b3e54be822413309d4b56e7435295398347b09c3ad86e81a5ade4ba018a1e9ecc4d9e430a3101e540b1d805f013e36
7
- data.tar.gz: 31314a903fbd5d88e31954d3303c0602e9d697532e6d723fe9ee1d7a4910137b574c6a30ea11c7d0e54a7505c7af6aa718cb0ebb4957bd32a089e4715c651dd1
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.1
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-05-11 00:00:00.000000000 Z
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