effective_posts 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/post.rb +2 -2
- data/lib/effective_posts/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: 7f406e0650b91463c3e1b876f9001bdafbf683563d9bf943512b7d87f8c00f9e
|
4
|
+
data.tar.gz: 1241584d8be8da46c3fa6f44fb765796a34e8ee74e6f137580d1984dc0a0d982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eade43433c5c0da6e64816a25c5cc8857702a2af369b1f7027c4cbe44b8f78370e4ad853f40555a9ce7f1f9428a72f330ec09e530b0f956f74bdcb775d157eb
|
7
|
+
data.tar.gz: d8107969ffb90e822afe14507044e8a040d65cb97e7c3a9444a648b90768cf9637c67a88ee2dbc07aacdeafea6a585895ac3f94f286f24275de9c2b8c466614a
|
@@ -57,8 +57,8 @@ module Effective
|
|
57
57
|
validates :start_at, presence: true, if: -> { category == 'events' }
|
58
58
|
|
59
59
|
scope :drafts, -> { where(draft: true) }
|
60
|
-
scope :published, -> { where(draft: false).where("
|
61
|
-
scope :unpublished, -> { where(draft: true).or(where("
|
60
|
+
scope :published, -> { where(draft: false).where("published_at < ?", Time.zone.now) }
|
61
|
+
scope :unpublished, -> { where(draft: true).or(where("published_at > ?", Time.zone.now)) }
|
62
62
|
scope :with_category, -> (category) { where(category: category) }
|
63
63
|
|
64
64
|
# Kind of a meta category
|