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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9913eb60854cd40a787d6b5f9ca3bf801937dda
4
- data.tar.gz: d38b9f2a79ed470d280e2bd7863c30927d798783
3
+ metadata.gz: b80a03cd72b71128e445f4f259ed04e9019a8158
4
+ data.tar.gz: 2c05c8bff2af16ac343ba6a961147d0480764008
5
5
  SHA512:
6
- metadata.gz: ff1daa7d79d43ee50c8412d6abaac44850d888c21a788111d4a6630c8faee9812c9a6dcc41c1e6de870c6aacbbb30ff56e6aa993123bcc4f1783368ee5a3e7c1
7
- data.tar.gz: f04185f7f5a118de12bc92a9a59f49e66ec29098118f87cfd51c5e4b69e0acbd0e18ae9405e1f4414ae94c0d45aebaff9ea538f45319d1034caea35fbf44eda8
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: 'archived') if @old_published.present?
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
@@ -1,3 +1,3 @@
1
1
  module Pulitzer
2
- VERSION = '0.15.3'
2
+ VERSION = '0.15.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulitzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.3
4
+ version: 0.15.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut