model_driven_api 3.1.13 → 3.2.0

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: b823fbfec58e3d2ed3fcfab93a4d1efbf71216d7f812f219a11f2f71842df4f5
4
- data.tar.gz: f991ce102699d8b91e85ea996520bed2b1693a13b533a0971fed3f899b53fa44
3
+ metadata.gz: 40a387e4cb1fccde214f680920f4ea2c0f69e9afa948ecad67670613b6306b24
4
+ data.tar.gz: 72849e5f1f4ef21dde1aef3974fa98375cdae76207ac09c38d3ecb6406b3ff2b
5
5
  SHA512:
6
- metadata.gz: 2fc75f3100b4021899d76b77c52210418ae0f832f97732d0edb8c53a037130394f025469f99d1bfba5943a3073c2d14b26858725d3828bcd44855e84804ad330
7
- data.tar.gz: bf00ba029b9f15f73465ee1ab9aa59cffc6296f8b45392defd4d7b330498c2c4cae0c89007bbffc0114a95dc0a97cefc7643f56c42494f2c37fdd8c72f33ffbf
6
+ metadata.gz: d7e790ae561684ef9ac0a0be51dc6dc6f9d3b1f9e6b6069f550f8f4d124bfe943243bf98c07dabbc07cf257c309025ff3b402e06cafd2fe0b18d9aed6e5e0101
7
+ data.tar.gz: 5ba4463d54423d0260e17fda9c06de588c98c92d0fbae78b8adb1c6f0448d1d0055c426504cb90d04e982976fff3cb99dd73d1bb9f51e0c641b5aafbbf99de81
@@ -9,7 +9,7 @@ class Api::V2::ApplicationController < ActionController::API
9
9
 
10
10
  before_action :authenticate_request
11
11
  before_action :extract_model
12
- before_action :find_record, only: [:show, :destroy, :update]
12
+ before_action :find_record, only: [:show, :destroy, :update, :patch]
13
13
 
14
14
  # GET :controller/
15
15
  def index
@@ -91,6 +91,9 @@ class Api::V2::ApplicationController < ActionController::API
91
91
  render json: @record.to_json(json_attrs), status: 200
92
92
  end
93
93
 
94
+ # Define the path method as an alias to the update one, they are basically the same method
95
+ alias_method :patch, :update
96
+
94
97
  def update_multi
95
98
  authorize! :update, @model
96
99
  ids = params[:ids].split(",")
data/config/routes.rb CHANGED
@@ -44,7 +44,7 @@ Rails.application.routes.draw do
44
44
 
45
45
  # # CRUD Delete
46
46
  delete '*path/:id/multi', to: 'application#destroy_multi'
47
- # delete '*path/:id', to: 'application#destroy'
47
+ delete '*path/:id', to: 'application#destroy'
48
48
  end
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module ModelDrivenApi
2
- VERSION = "3.1.13".freeze
2
+ VERSION = "3.2.0".freeze
3
3
  end
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.1.13
4
+ version: 3.2.0
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-04-10 00:00:00.000000000 Z
11
+ date: 2024-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.5.3
170
+ rubygems_version: 3.5.9
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Convention based RoR engine which uses DB schema introspection to create