thecore_api 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ba25e97ca0df6dac1d4a056f6a493d22b291f66cdb83d2f92d87b96eb1e7727
4
- data.tar.gz: 8a01c57ddcf3b1f161674245a04929ce8b7d7f091628c25ea731fff65c0d9924
3
+ metadata.gz: 2e2eb252c14d1e5b35e80c286ae80db58acf3f07fcec1169ed41d7639ef5e810
4
+ data.tar.gz: 4cd74f5b7c8c3772f1a2dcbcb78baf135a45b447953fb221c79b5749515934b3
5
5
  SHA512:
6
- metadata.gz: 1790ff7432f0e4979b28dd478fc990c947b522575110fb1aed7f36e99a079f8f4305a8393a38797c7cb70f50d2f52eb7fde76c8bb8e173f6f9eb1b969b3cb724
7
- data.tar.gz: f2ea763ecbc44a9f840f0f24ac59a86703ab976fc9cd0da6b178dea7c1f997f74d8a2d536ac7598a686f57556b72681e2f415ac795653bb153892dc52ce19c3f
6
+ metadata.gz: b2b72defdb59f07216a06e6b4df240811374b87b9012d508bfc93575d7bfea1eff09d78663117e956de34f5f21b9cac236c3601f2ebd9eaf3011d893440e53d9
7
+ data.tar.gz: a8d441aede32758e8fbf71992bf9ea9a6bcab4c50aacd6132b21b0ac772837d1de519b71a234566f59785d30fbc968cf369b135d1a69f24fe34007508750fb6c
@@ -65,10 +65,12 @@ class Api::V1::BaseController < ActionController::API
65
65
  elsif request.post?
66
66
  # Non sono certo che i request params gli arrivino... Domani da testare
67
67
  # Il body come glielo passo?
68
+ @params = params
68
69
  create
69
70
  elsif request.put?
70
71
  # Non sono certo che i request params gli arrivino... Domani da testare
71
72
  # Il body come glielo passo?
73
+ @params = params
72
74
  find_record path.second.to_i
73
75
  update
74
76
  elsif request.delete?
@@ -245,7 +247,7 @@ class Api::V1::BaseController < ActionController::API
245
247
 
246
248
  def request_params
247
249
  # controller_name.singularize.to_sym
248
- params.require(@singular_controller).permit!
250
+ (@params.presence || params).require(@singular_controller).permit!
249
251
  end
250
252
 
251
253
  def json_attrs
@@ -1,3 +1,3 @@
1
1
  module ThecoreApi
2
- VERSION = "1.3.5".freeze
2
+ VERSION = "1.3.6".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni