model_driven_api 2.3.8 → 2.3.9

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: b8eeb8407dddfe99afa98093d2c16b193572843694616f7b27249c3661390b16
4
- data.tar.gz: 31287c2fb6cb36353e76652e470e6d3c58ad4d4140c08a90e3b633ab98324a91
3
+ metadata.gz: 1da45cd3ee59fe0a531f304af8a0333559584977238737395b78864a1020b2c2
4
+ data.tar.gz: 49a829a12437ab3f901cad50689ef4d6de74824db86f42e5be5b050d897f9229
5
5
  SHA512:
6
- metadata.gz: 519231f4c1073ffe54c3800ade34ee21cbcee27bfa8e568b66521808458a9def469679a01ca82222056ea69cbd314eb5a8a5bac979ba8801ea7ee7b926e2835c
7
- data.tar.gz: 4ed7f93269ce8bf37104a36cb3b71c5de52f45d7ce6623eee6ffdcb2b95fd86c53b043ff5bf2e2692a784a9d079dfe0b787e9bb228486a4d4854faf4c7a03529
6
+ metadata.gz: 24bca1df42a775c4ea9d74d75ec6ac02de6e68e4e4693d433c03c2a1016535db81c9a2e37c419a4f51552f62c928306383db999a20448bf89aeac012449ecf52
7
+ data.tar.gz: 8a345a1bc8d20e846b98d653bec7b8a6da86136cf88d5b38fa278476f10a5fb2785d31f8fe73bf03061b209d95f2fc2c27f426bf73c6cad93682f62507165abc
@@ -148,7 +148,11 @@ class Api::V2::ApplicationController < ActionController::API
148
148
  end
149
149
 
150
150
  def json_attrs
151
- ((@model.json_attrs.presence || @json_attrs.presence || {}) rescue {})
151
+ # In order of importance: if you send the configuration via querystring you are ok
152
+ # has precedence over if you have setup the json_attrs in the model concern
153
+ from_params = params[:a].deep_symbolize_keys unless params[:a].blank?
154
+ from_params = params[:json_attrs].deep_symbolize_keys unless params[:json_attrs].blank?
155
+ from_params.presence || @model.json_attrs.presence || @json_attrs.presence || {} rescue {}
152
156
  end
153
157
 
154
158
  def extract_model
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.3.8
4
+ version: 2.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-08 00:00:00.000000000 Z
11
+ date: 2021-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons