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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 944adb32f3ec654befa27d7f8f85e95939d56af9fa6892b890702d4d1a6b1ac1
4
- data.tar.gz: 89c1928fa45b58c2cb7579b38aa0ffcc109c199f3b62c3696f799fb739ddf88b
3
+ metadata.gz: 84c4ada25fc650fcb7f2a9b9c8322562bda944bd1180815e60bf3f3ef7534d94
4
+ data.tar.gz: 246e38a66ff7fb77ca953ef0e222720defdc72447eac982bdf5e39c7c0b34a0f
5
5
  SHA512:
6
- metadata.gz: 2aade9c6ba2688cfedcedef29bb4fc58d2c5a57f671458f79925951b79fbf9374f2e94fb2a3d2478856a725e99b1fb9544b67045315121b2b342003c84244b40
7
- data.tar.gz: 98cd35b091d8993d601443fa7cf4097b0f1d42ea4b93d6c15eafc936b1eb5cc66086b666c752ad7c2cc6ee563dcb08a110f88e50b1e363bb053d23fd0d63118e
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
@@ -1,3 +1,3 @@
1
1
  module Editmode
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
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.5
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-14 00:00:00.000000000 Z
11
+ date: 2020-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler