homesteading_helpers 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09f96e4b8f77fed1ab53a1682d7c0b01e1fc7b72
|
4
|
+
data.tar.gz: 5d41361f710e70b3f6a0ac16294bf611f9eeda50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e251bfe777cb9da15ea81727aaf6c05f43e3c8fd8a18386a64811cf4451d6ef4e46eae4dc4457b9ff955a1042e3eaffd42f0e6fa73a5c73457e1deb5d3be8917
|
7
|
+
data.tar.gz: 326390ae570e83000b5a3c6cc857cc4656726490122bbb95577e4417d81b302ec7662c1db3d4f6ced2ec0cf46e3f3fdaa9087c6bbb95950a69e5befd11dca3c4
|
@@ -23,11 +23,13 @@ module HomesteadingHelpers
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def nth_of_day(post)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
nth = post.class.constantize.where(
|
27
|
+
year: post.year,
|
28
|
+
month: post.month,
|
29
|
+
day: post.day
|
30
|
+
).all.sort_by{|n| n.published_at}.index(post) + 1
|
31
|
+
|
32
|
+
if nth.nil?
|
31
33
|
nth = 1
|
32
34
|
end
|
33
35
|
|