acts_as_moonable 0.3.0 → 0.3.1
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 +4 -4
- data/lib/acts_as_moonable/interval.rb +4 -4
- data/lib/acts_as_moonable/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: 1069cb51f6f5a5cfe576a5589a26091eb9d9d2e92ea2d2dc1f622e93d4cb27ee
|
|
4
|
+
data.tar.gz: cfa077d459d3ba48ab1b1ac18073e2946e715fd69d65ab9b1b371adf79fd2c43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be4769d3247362c0f0c23a50d03f6f5552869c203e519f78ec2fc590e3ca3bad53d3d56f2c790ce590da19124def7f97625c743be35c8a8f9ad46d5d5a1b239e
|
|
7
|
+
data.tar.gz: 3edd32893f30569e40f016b369d8cacafcea939360388439ec7de005bf8c251ed0a5a09f505fd014d34b28f955d77939e7ed1a4ac14075bc149205fa8e750531
|
|
@@ -36,10 +36,10 @@ module ActsAsMoonable
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
# database: utc time
|
|
39
|
-
# parameter: local date
|
|
40
|
-
scope :local_field_interval, -> (field,
|
|
41
|
-
t1 =
|
|
42
|
-
t2 =
|
|
39
|
+
# parameter: local date
|
|
40
|
+
scope :local_field_interval, -> (field, d1, d2) {
|
|
41
|
+
t1 = d1.to_time.beginning_of_day if d1.present?
|
|
42
|
+
t2 = d2.to_time.end_of_day if d2.present?
|
|
43
43
|
time_field_interval(field, t1, t2)
|
|
44
44
|
}
|
|
45
45
|
end
|