pulitzer 0.15.9 → 0.15.10

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: 5c948552e448c15638ba043b8d2886ca232b6adb
4
- data.tar.gz: cafafc7a79ffc7b428289f383f8a682a745748b2
3
+ metadata.gz: 8f00ecd18b5c59ebfd7d6d434adeee77dbd71412
4
+ data.tar.gz: c57ab1264da606f3cd00c939e79c31a7bd23ca77
5
5
  SHA512:
6
- metadata.gz: ef74b39387bb1f0d0a14eb3778acce300f0239d631e44d8b5ee8b16ac9b1b90b79093fdd35fc73943a49b9e984bbbe2b108e15ff3ee77906370c0ce247636396
7
- data.tar.gz: 94a3de232455c1673e957e1b3f7494010806021359555908bda69345796ca363a3270ba3ff7b0a315ce2acb4d3febf77a01eec88464bfe55748d02dea66253bc
6
+ metadata.gz: 90441d8c41ea0635c6c77ad42a08e816f9825f95cd70733f694b2537c47ccc5db8cb4bcf98b1eb2c8cfba1ea0a1b38c6d638740c15b3f3845cfe21957f525026
7
+ data.tar.gz: e5cdda3ff2449b6d01b4b22a454e2e97cfc973072cfd021a341f0ff3c7cfcd7cb6ab33e75ebcd680f4d2847a9e3e11e3a0d6a87829125452d22da5afc171b58b
@@ -19,10 +19,14 @@ module Pulitzer
19
19
  end
20
20
 
21
21
  def get_post_for_version(ptv,status)
22
- if ptv.plural?
23
- ptv.posts.find_by!(slug: params[:slug]).send "get_#{status}_version!"
22
+ if ptv.present?
23
+ if ptv.plural?
24
+ ptv.posts.find_by!(slug: params[:slug]).send "get_#{status}_version!"
25
+ else
26
+ ptv.singleton_post.get_active_version!
27
+ end
24
28
  else
25
- ptv.singleton_post.get_active_version!
29
+ nil
26
30
  end
27
31
  end
28
32
 
@@ -1,3 +1,3 @@
1
1
  module Pulitzer
2
- VERSION = '0.15.9'
2
+ VERSION = '0.15.10'
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.9
4
+ version: 0.15.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut