pulitzer 0.5.0 → 0.5.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04bdb0c13f4a08761b137284b1a6b02c941b862c
|
4
|
+
data.tar.gz: b69db38fb69291355fa60861a9ada1d56d2fbbd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
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>
|
data/lib/pulitzer/version.rb
CHANGED