pulitzer 0.15.18 → 0.15.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/pulitzer/post.rb +2 -2
- data/lib/pulitzer/content_element_helper.rb +6 -10
- data/lib/pulitzer/exceptions.rb +2 -1
- data/lib/pulitzer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8351c9d32ad098ca8aaf6ada32f95ec82e7f76b9
|
4
|
+
data.tar.gz: 6007e6cdb4db72d84fb6849c510b25da12424b2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61de067fc0373233a319954abd196e362771416bb27f7ca39df22aadd3f978ddda8e7b1b750ffbc9ef1a74cf0b63791b985dbf8dd20a9918b894c968851ca041
|
7
|
+
data.tar.gz: 59e71dfb8a6110559df1a0ed3da38b8238c0fe1d21064e7efed4bcc9532b8cabcab5b3e1eafd6a3f03b552266aeba0fd2f917a3b4dd88da6cf5af29d21aabaee
|
data/app/models/pulitzer/post.rb
CHANGED
@@ -6,7 +6,7 @@ module Pulitzer
|
|
6
6
|
has_one :active_version, -> { where(status: 'active') }, class_name: "Pulitzer::Version"
|
7
7
|
|
8
8
|
accepts_nested_attributes_for :versions
|
9
|
-
|
9
|
+
|
10
10
|
belongs_to :post_type_version
|
11
11
|
delegate :post_type_content_element_types, :free_form_section_types, :has_free_form_sections?, :has_templated_content_elements?, :post_type, :post_type_id, :plural?, to: :post_type_version
|
12
12
|
delegate :post_tags, :content_elements, :content_element, :section, :has_label_type, :has_label, :post_tags_for, to: :active_version, allow_nil: true
|
@@ -28,7 +28,7 @@ module Pulitzer
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
def self.convert_nested_assoc(json_hash)
|
33
33
|
this_array = json_hash.has_key?(attrs_name) ? json_hash[attrs_name] : [json_hash]
|
34
34
|
this_array.map!{|p_attrs|
|
@@ -73,16 +73,12 @@ module Pulitzer
|
|
73
73
|
|
74
74
|
def render_cms_section(version, section_name)
|
75
75
|
section = version.section(section_name)
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
else
|
83
|
-
Rails.logger.error "[Pulitzer] Version #{version.inspect} has no section named #{section_name}"
|
84
|
-
""
|
85
|
-
end
|
76
|
+
fail SectionMissingError.new("Version #{version.inspect} is missing a section called '#{section_name}' but it's trying to render it.") unless section
|
77
|
+
section.partials.collect do |partial|
|
78
|
+
if partial.has_display?
|
79
|
+
render partial: partial.full_view_path, locals: {partial: partial}
|
80
|
+
end
|
81
|
+
end.join.html_safe
|
86
82
|
end
|
87
83
|
end
|
88
84
|
end
|
data/lib/pulitzer/exceptions.rb
CHANGED
data/lib/pulitzer/version.rb
CHANGED
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.
|
4
|
+
version: 0.15.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|