model_driven_api 2.4.5 → 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: 1ed6351d23e6db1dca7d4fffe1ac0e532d12492c404cdf37763afd644fc5cca5
4
- data.tar.gz: 3003182226f97c82f510c5b5e3b38a78cd851eab30378035cb939afdc94a863c
3
+ metadata.gz: df49bbe3e54bdd08520d243513d0894a8d7551e10076cd0980f3608e79d09d79
4
+ data.tar.gz: c3707cec47cf298991d0dcfb142951bcb4b19e18fb336064c5a95cf77b415381
5
5
  SHA512:
6
- metadata.gz: 56ab41d307daf87674df375320d361d525bb941367dd7be9f95b3f9f0568f4ff91b243215720ba1e13fcb46130ce6dd2a60b780ca50700c97ec92ed87d0d6e8a
7
- data.tar.gz: 2d4cbb4267a876d13ddd5f18a6bf89a794afccdb0cbc418c4080a5adf3716a80e9a9346529a80f0f18b78e9623cf1b0c3e06db5c2b61069c4618b8ace6cdab96
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"
@@ -1,4 +1,4 @@
1
- require 'model_driven_api/version'
1
+ # require 'model_driven_api/version'
2
2
  class Api::V2::InfoController < Api::V2::ApplicationController
3
3
  # Info uses a different auth method: username and password
4
4
  skip_before_action :authenticate_request, only: [:version], raise: false
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.4.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-02-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
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
19
+ version: '2.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.1'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jwt
29
29
  requirement: !ruby/object:Gem::Requirement