pulitzer 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cc6b5f1e56ff29aefb283d285ddb3b3be0dd8d0
4
- data.tar.gz: 85dc89e8e77764f9e119a09573aee92a16851c05
3
+ metadata.gz: 04bdb0c13f4a08761b137284b1a6b02c941b862c
4
+ data.tar.gz: b69db38fb69291355fa60861a9ada1d56d2fbbd0
5
5
  SHA512:
6
- metadata.gz: 51f188ac42bfafc86c44ca21f54f2b806cef6f5600da1850e35627b25ae3e2608fc88196614f1f11608391e6111ee84c95d96b976bef8af5f6512a2e43373b74
7
- data.tar.gz: b41aaf43ad10e7f0b649a80624082887d934f553c9027be0619f6f6f6e83aff10929f793135d478b172d1d8962cd2a3b9bb761e2a5f1e3741123557c26768b8d
6
+ metadata.gz: 92fc460dac9879e0d478ad5bb4dc5bf863a021fcf9c79532df719f2aa71e703d8772aba7299eb1d96c97f79b726a4287171c952b7604577b85f4a537cb67d04c
7
+ data.tar.gz: f281b95190645c2dceefc296cffeae8237b5a120de3b798d7cb15166b85de7b2f821ae07bb2e7d23576a62411bcbb0e4d5c8b52af3ad5100dee963be116cbb8c
@@ -13,7 +13,11 @@ class Pulitzer::UpdateVersionStatus
13
13
  def make_version_active
14
14
  @new_active_version = @transitional_version
15
15
  @old_active_version = @new_active_version.post.active_version
16
- @new_active_version.update(status: :active)
16
+ begin
17
+ @new_active_version.update!(status: :active)
18
+ rescue ActiveRecord::RecordInvalid => invalid
19
+ Rails.logger.error(invalid.record.errors.messages.to_s)
20
+ end
17
21
  @new_active_version.tags.each &:touch
18
22
  @old_active_version.update(status: :archived) if @old_active_version
19
23
  @processing_version = @post.create_processing_version
@@ -6,7 +6,7 @@ class Pulitzer::PostType < ActiveRecord::Base
6
6
  has_many :content_element_types, through: :post_type_content_element_types
7
7
  has_many :free_form_section_types, dependent: :destroy
8
8
  has_many :layouts, dependent: :destroy
9
-
9
+
10
10
  scope :templates, -> { where(kind: Pulitzer::PostType.kinds[:template])}
11
11
  scope :partials, -> { where(kind: Pulitzer::PostType.kinds[:partial])}
12
12
  validates :name, :kind, presence: true
@@ -25,7 +25,7 @@ class Pulitzer::PostType < ActiveRecord::Base
25
25
  end
26
26
 
27
27
  def singleton_post?
28
- !!singleton_post
28
+ !plural
29
29
  end
30
30
 
31
31
  def has_templated_content_elements?
@@ -1,6 +1,8 @@
1
1
  <div class="pulitzer-row">
2
2
  <ul class="list">
3
3
  <li><%= post.slug %></li>
4
- <li><%= ajax_link "Edit", edit_slug_post_path(post), {}, dom_target(post) %></li>
4
+ <% unless post.post_type.singleton_post? %>
5
+ <li><%= ajax_link "Edit", edit_slug_post_path(post), {}, dom_target(post) %></li>
6
+ <% end %>
5
7
  </ul>
6
8
  </div>
@@ -1,3 +1,3 @@
1
1
  module Pulitzer
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut