smart_params 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smart_params/field.rb +1 -1
- data/lib/smart_params/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1458539488f74741cfe2d72128e13d5d1d69a2319de21d78418bd93b271207f9
|
4
|
+
data.tar.gz: d19c9e978bb33e4810e29f53da29e8e191d0d0e5fd61cc5f7254b199b1091d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d29f490037927c01a4d7b07a6897487b4db8f6899b4ede1ae51bf0616224abb846579458f8f0bba699ce5bb2615ee9e4b00b933fd861f7d04a066d212e681c88
|
7
|
+
data.tar.gz: 86f18060913fac28db9b127bbc8904eeead3170cd17551cb854148b6ca87ee49786b6a3bc14c881334764d776901791519afc27944d77e0ed89179c3a63fc3de
|
data/lib/smart_params/field.rb
CHANGED
@@ -32,7 +32,7 @@ module SmartParams
|
|
32
32
|
@value = type[raw.dig(*keychain)]
|
33
33
|
end
|
34
34
|
rescue Dry::Types::ConstraintError => bad_type_exception
|
35
|
-
raise SmartParams::Error::InvalidPropertyType, keychain: keychain, wanted: type, raw: raw.dig(*keychain)
|
35
|
+
raise SmartParams::Error::InvalidPropertyType, keychain: keychain, wanted: type, raw: if keychain.empty? then raw else raw.dig(*keychain) end
|
36
36
|
end
|
37
37
|
|
38
38
|
def to_hash
|
data/lib/smart_params/version.rb
CHANGED