pulitzer 0.15.3 → 0.15.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/pulitzer/post_type_version/publish.rb +2 -2
- data/lib/pulitzer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80a03cd72b71128e445f4f259ed04e9019a8158
|
4
|
+
data.tar.gz: 2c05c8bff2af16ac343ba6a961147d0480764008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b7f11afa32816f9f3021e924eff95a8a20b2051e487c5e919f615e83d10c11a2c6982d928d0e45cdced1eef81e5ff48985c32611f21f9c6cd7502a2b8a01d3f
|
7
|
+
data.tar.gz: 6d9e527f043389d6d7479371119369f902ff466164c47993387e3fd42e1e9bab6ec2d836a50a97630390b53f861f8266aad874e725043396b015c4a1d15e0bf3
|
@@ -21,7 +21,7 @@ class Pulitzer::PostTypeVersion::Publish
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def archive_old_version
|
24
|
-
@old_published.update(status: '
|
24
|
+
@old_published.update(status: 'retired') if @old_published.present?
|
25
25
|
end
|
26
26
|
|
27
27
|
def get_old_published_version
|
@@ -29,7 +29,7 @@ class Pulitzer::PostTypeVersion::Publish
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def validate_published_post
|
32
|
-
if @post_type_version.posts.none?{|post| post.active_version.present?}
|
32
|
+
if @post_type_version.template? && @post_type_version.posts.none?{|post| post.active_version.present?}
|
33
33
|
@post_type_version.errors.add(:base, 'You must publish a post before publishing the post type')
|
34
34
|
return false
|
35
35
|
end
|
data/lib/pulitzer/version.rb
CHANGED