has_safe_dates 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/has_safe_dates/core_ext.rb +1 -1
- data/lib/has_safe_dates/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: cee9c915f6acb8ba655ee6bb1c107eaf0ba7a53096e3be1499999d8e98fd9b5f
|
4
|
+
data.tar.gz: c895f0e4ca98ee6d15e74a13d7f516d8c133574c8ead78dcb943ef0c63a170f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0e27bdaf8386e2137184dbbb2edc0179a52dfb956a79f1576ae708f85bd9f1d46bce9027d0e27390f7caf370b94f3fea79d8062bb1fd46349b4071a98a5d3b
|
7
|
+
data.tar.gz: b4aef016b49b28512f135fa27dfb9ad67ab6416669d9d4ec3de7b4465d2eb493583df65acce37439443b5ae4b5091d3bc61dbeb822a37a27b0fc0bf59f40e5f4
|
@@ -60,7 +60,7 @@ module HasSafeDates
|
|
60
60
|
if ::ActiveRecord::Base.has_safe_fields_config[self.class.base_class]
|
61
61
|
callstack.each do |name, values_with_empty_parameters|
|
62
62
|
if ActiveRecord::Base.has_safe_fields_config[self.class.base_class][:fields].include?(name)
|
63
|
-
date = values_with_empty_parameters.values_at(1, 2, 3).join("-")
|
63
|
+
date = values_with_empty_parameters.values_at(1, 2, 3).compact.join("-")
|
64
64
|
time = values_with_empty_parameters.values_at(4, 5).compact.join(":")
|
65
65
|
datetime_string = "#{date}#{time.blank? ? "" : " #{time}"}"
|
66
66
|
|