mongoid-publishing_logic 0.2.2 → 0.3.0
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: 731f5503f87a48edf3d45fdede892ac010cd75b2
|
4
|
+
data.tar.gz: 58f5b7d92c6936a614614eac482c8d7ccb368b54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 535f4b817c9cc4103c226bf95844cb8fd936e43ab44e5f404ab554be885bb4c89d1e50493ee0d07d6c7f33ae1682ac7f82028c8db2545595b2d0119a63df7a09
|
7
|
+
data.tar.gz: 37f6021c9512b020e7d3291d017cbba73a8c3f674eee99122da75aaf2ba99fec449fead5f4a2dc6ba0e6a4387e65005e98ba3c844b39e83e23d0b52abeb60491
|
@@ -56,11 +56,11 @@ module Mongoid
|
|
56
56
|
}
|
57
57
|
end
|
58
58
|
|
59
|
-
def published?(locale
|
59
|
+
def published?(locale: I18n.locale, ignore_active_status: false)
|
60
60
|
locale_was = I18n.locale
|
61
61
|
begin
|
62
62
|
I18n.locale = locale
|
63
|
-
super()
|
63
|
+
super(ignore_active_status: ignore_active_status)
|
64
64
|
ensure
|
65
65
|
I18n.locale = locale_was
|
66
66
|
end
|
@@ -55,7 +55,7 @@ module Mongoid
|
|
55
55
|
}
|
56
56
|
end
|
57
57
|
|
58
|
-
def published?(ignore_active_status
|
58
|
+
def published?(ignore_active_status: false)
|
59
59
|
if ignore_active_status || PublishingLogic.active?
|
60
60
|
published_flag && (
|
61
61
|
(publishing_date.nil? || publishing_date <= Date.today) &&
|