editmode 1.2.5 → 1.2.6
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 +4 -4
- data/README.md +8 -0
- data/lib/editmode/action_view_extensions/editmode_helper.rb +2 -2
- data/lib/editmode/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c4ada25fc650fcb7f2a9b9c8322562bda944bd1180815e60bf3f3ef7534d94
|
4
|
+
data.tar.gz: 246e38a66ff7fb77ca953ef0e222720defdc72447eac982bdf5e39c7c0b34a0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c891c169c1759113a86a6cf8daa6f7910b676e5296b036784cf37a2dec35f6d82b3237d8284027ecb3bb6126c9e168de5dcbceedc8f6829161bd6a7b844cb25
|
7
|
+
data.tar.gz: a674897c9c9a1c5ef04f95fb378982343557dd14f03e4b5e55a6093cbf470b56ef663aa7c3bed30bb7e475c53b5a4ee3b1164143bc7e1e83e545cb8ef74feeac
|
data/README.md
CHANGED
@@ -50,6 +50,12 @@ Editmode provides helper methods for use in your rails views and controllers.
|
|
50
50
|
<%= E('cnk_x4ts...', class: "a-css-class") %> # Render a chunk with inline css class
|
51
51
|
```
|
52
52
|
|
53
|
+
### Working with multiple projects in the same codebase
|
54
|
+
If you want to include content from a different project to the one you've specified in the initializer, you can pass the project id in to the view helper.
|
55
|
+
```erb
|
56
|
+
<%= E("cnk_16e04a02d577afb610ce", project_id: "prj_02d577afb617hdb") %>
|
57
|
+
```
|
58
|
+
|
53
59
|
### Content can also be accessed in Controllers
|
54
60
|
```ruby
|
55
61
|
@page_title = e("cnk_x4ts............") # Using a chunk identifier
|
@@ -78,6 +84,8 @@ e("cnk_16e04a02d577afb610ce", "Email Content", variables: variable_values)
|
|
78
84
|
# Response: "Hi Dexter Morgan"
|
79
85
|
```
|
80
86
|
|
87
|
+
|
88
|
+
|
81
89
|
### Use collections for repeatable content
|
82
90
|
```erb
|
83
91
|
<%= c('col_j8fbs...', class: "profiles-container", item_class: "profile-item") do %>
|
@@ -56,14 +56,14 @@ module Editmode
|
|
56
56
|
chunks.each do |chunk|
|
57
57
|
@custom_field_chunk = chunk
|
58
58
|
concat(content_tag(:div, class: "chunks-collection-item--wrapper #{item_class}") do
|
59
|
-
yield
|
59
|
+
yield(@custom_field_chunk)
|
60
60
|
end)
|
61
61
|
end
|
62
62
|
|
63
63
|
# Placeholder element for new collection item
|
64
64
|
@custom_field_chunk = chunks.first.merge!({placeholder: true})
|
65
65
|
concat(content_tag(:div, class: "chunks-hide chunks-col-placeholder-wrapper") do
|
66
|
-
yield
|
66
|
+
yield(@custom_field_chunk)
|
67
67
|
end)
|
68
68
|
end
|
69
69
|
else
|
data/lib/editmode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: editmode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Ennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|