pulitzer 0.15.5 → 0.15.6

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: 9eeb202e25c126d002ebb609e8945fd2ffd4279e
4
- data.tar.gz: 5d1ad3277a3aa8ef8d2a1805b1a3e8bae86918a2
3
+ metadata.gz: b582418ef40475700755fdefb0fdd07618501f30
4
+ data.tar.gz: 0627f3b171f3933f74ea37bc46f61724a9bb3df1
5
5
  SHA512:
6
- metadata.gz: 2ee6903af915a3a5ae9dae0654b1ba76597d242d572ebd57f27a0f4936a99512a6d85821c6c46c405606348e604732acc2ecda397e5fcf10e233040e405fe824
7
- data.tar.gz: 3c79e964bf29ca7d3fc249668c93bce2427703bd7bcfa6650ea2a9783f072a0a3272fbd86c9897a3142b13edbef63253f2def4c8712dda73b78746822fe35920
6
+ metadata.gz: 64b62fb7fe3d4d2c2c0282fadef2a6aadadcd9ac2742d22553aae1b033681328101c8cf08222de70f465656aa63e297a9f196c0c2fb2e9f590a98605f40470a6
7
+ data.tar.gz: 61cb8669129318f91dfbff5ee1535a3678f891a34cb7a6b0d9ae495c832b98578645b29b6e52b385d5bd4c161347de98224c41e98d9e29941d5515cad36f4807
@@ -8,19 +8,19 @@ module Pulitzer
8
8
 
9
9
  def get_active_post(post_type_name)
10
10
  @post_type_version = Pulitzer::PostType.named(post_type_name).published_type_version
11
- @post = get_post_for_version(@post_type_version)
11
+ @post = get_post_for_version(@post_type_version,:active)
12
12
  return @post, @post_type_version
13
13
  end
14
14
 
15
15
  def get_preview_post(post_type_name)
16
16
  @post_type_version = Pulitzer::PostType.named(post_type_name).post_type_versions.find_by(version_number: params[:version_number])
17
- @post = get_post_for_version(@post_type_version)
17
+ @post = get_post_for_version(@post_type_version,:preview)
18
18
  return @post, @post_type_version
19
19
  end
20
20
 
21
- def get_post_for_version(ptv)
21
+ def get_post_for_version(ptv,status)
22
22
  if ptv.plural?
23
- ptv.posts.find_by!(slug: params[:slug]).get_active_version!
23
+ ptv.posts.find_by!(slug: params[:slug]).send "get_#{status}_version!"
24
24
  else
25
25
  ptv.singleton_post.get_active_version!
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module Pulitzer
2
- VERSION = '0.15.5'
2
+ VERSION = '0.15.6'
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.5
4
+ version: 0.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut