virtus-multiparams 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/virtus/multiparams.rb +3 -1
- data/lib/virtus/multiparams/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00551b5359c3d4a0ffd285d50758da58476c4527
|
4
|
+
data.tar.gz: c146761e18ecfb670297dae3763f3458fce14c1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa099f0c28b7a2e8d91e22917c624f7d0e792bc3a7a16f17f8aa78744a4b09412d3ed9c9cd036515916bd7128dd868ce47de876c40de566e8ea05781aa86dde5
|
7
|
+
data.tar.gz: b4de790ca5437672edd03b9ffcf36aa7a4f41d9c883adc2667a90d90a7ca94b14ca79053c2f26bb806b6a387d2ae77cf863f94e523b13e15fa9346f05adbe9ed
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/virtus/multiparams.rb
CHANGED
@@ -38,7 +38,9 @@ module Virtus
|
|
38
38
|
if attribute.primitive <= Date || attribute.primitive <= Time
|
39
39
|
# Basic convesion is enough, Virtus invokes `to_date[time]`
|
40
40
|
# Also, lololol timezones
|
41
|
-
|
41
|
+
if array.length >= 3 && array[0...3].none?(&:nil?) && array[0...3].none?(&:zero?)
|
42
|
+
Time.new(*array[0...6])
|
43
|
+
end
|
42
44
|
else
|
43
45
|
array
|
44
46
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|