standardapi 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/standard_api/orders.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f276df6b8c02e60277971a4a7c0b4119805a813
|
4
|
+
data.tar.gz: f1a04f95d568360aef96f66c5544cd257c210f7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55a1400893f87c82b670ca5b0f523249dfdf719cb0c4521a286e879fdc5b352a95b9aae7e5f91b947562647863c58f7eae1a919aea203fb13a20d6017081559a
|
7
|
+
data.tar.gz: 220e40e163998406f669414adeb90d83ed0a957fac003e82532a37f94e527a9cedcb2bd9954ffe4883b6549331ba7843db4807690ff51ba48dc52ca8ea4cd446
|
data/lib/standard_api/orders.rb
CHANGED
@@ -11,7 +11,10 @@ module StandardAPI
|
|
11
11
|
case orders
|
12
12
|
when Hash
|
13
13
|
orders.each do |key, value|
|
14
|
-
if
|
14
|
+
if key.to_s.count('.') == 1
|
15
|
+
key2, key3 = *key.to_s.split('.')
|
16
|
+
permitted = sanitize({key2.to_sym => { key3.to_sym => value } }, permit)
|
17
|
+
elsif permit.include?(key.to_s)
|
15
18
|
value = value.symbolize_keys if value.is_a?(Hash)
|
16
19
|
permitted = { key.to_sym => value }
|
17
20
|
elsif permit.find { |x| x.is_a?(Hash) && x.has_key?(key.to_s) }
|