katalyst-content 0.2.1 → 0.2.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 427d77cb72196829474e950c6e3d184aa6d7215b4c01204d033202bb527e4e98
|
4
|
+
data.tar.gz: 7f42967dbc39534e2ed23f4380fb7e2161d4d5f6fbddee6abd03e5be2939b070
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bf16bbe915b8f3910b1707be2cf96c47f186de277b66e2f71c5a2abac11f23c2994482245ab99330fb86fa7e11a87b4e8495e2f4133dd7661ce2e8775de0d08
|
7
|
+
data.tar.gz: 0c910c64438aa44be0ed04f9f2b666e325a8b5135b9ff307f396c5fe70b40bcc16011ad00400b882f8a30a35bdc9dd8d39c1e3e45726f38cf1ab582b1f9de538
|
@@ -4,17 +4,32 @@ module Katalyst
|
|
4
4
|
module Content
|
5
5
|
module FrontendHelper
|
6
6
|
def render_content(version)
|
7
|
-
|
7
|
+
without_partial_path_prefix do
|
8
|
+
render partial: version.tree.select(&:visible?)
|
9
|
+
end
|
8
10
|
end
|
9
11
|
|
10
12
|
def render_content_items(items)
|
11
13
|
items = items.select(&:visible?)
|
12
|
-
|
14
|
+
without_partial_path_prefix do
|
15
|
+
render partial: items if items.any?
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
19
|
def content_item_tag(item, **options, &block)
|
16
20
|
FrontendBuilder.new(self, item).render(**options, &block)
|
17
21
|
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def without_partial_path_prefix
|
26
|
+
current = prefix_partial_path_with_controller_namespace
|
27
|
+
|
28
|
+
self.prefix_partial_path_with_controller_namespace = false
|
29
|
+
yield
|
30
|
+
ensure
|
31
|
+
self.prefix_partial_path_with_controller_namespace = current
|
32
|
+
end
|
18
33
|
end
|
19
34
|
|
20
35
|
class FrontendBuilder
|
data/config/locales/en.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_storage_validations
|