compony 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +10 -0
  4. data/VERSION +1 -1
  5. data/compony.gemspec +3 -3
  6. data/doc/ComponentGenerator.html +1 -1
  7. data/doc/Components.html +1 -1
  8. data/doc/ComponentsGenerator.html +1 -1
  9. data/doc/Compony/Component.html +139 -44
  10. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  11. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  12. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  13. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default.html +1 -1
  16. data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
  17. data/doc/Compony/ComponentMixins.html +1 -1
  18. data/doc/Compony/Components/Button.html +2 -2
  19. data/doc/Compony/Components/Destroy.html +14 -14
  20. data/doc/Compony/Components/Edit.html +2 -2
  21. data/doc/Compony/Components/Form.html +86 -86
  22. data/doc/Compony/Components/New.html +14 -14
  23. data/doc/Compony/Components/WithForm.html +2 -2
  24. data/doc/Compony/Components.html +1 -1
  25. data/doc/Compony/ControllerMixin.html +1 -1
  26. data/doc/Compony/Engine.html +1 -1
  27. data/doc/Compony/MethodAccessibleHash.html +1 -1
  28. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  29. data/doc/Compony/ModelFields/Association.html +1 -1
  30. data/doc/Compony/ModelFields/Attachment.html +1 -1
  31. data/doc/Compony/ModelFields/Base.html +1 -1
  32. data/doc/Compony/ModelFields/Boolean.html +1 -1
  33. data/doc/Compony/ModelFields/Color.html +1 -1
  34. data/doc/Compony/ModelFields/Currency.html +1 -1
  35. data/doc/Compony/ModelFields/Date.html +1 -1
  36. data/doc/Compony/ModelFields/Datetime.html +1 -1
  37. data/doc/Compony/ModelFields/Decimal.html +1 -1
  38. data/doc/Compony/ModelFields/Email.html +1 -1
  39. data/doc/Compony/ModelFields/Float.html +1 -1
  40. data/doc/Compony/ModelFields/Integer.html +1 -1
  41. data/doc/Compony/ModelFields/Percentage.html +1 -1
  42. data/doc/Compony/ModelFields/Phone.html +1 -1
  43. data/doc/Compony/ModelFields/RichText.html +1 -1
  44. data/doc/Compony/ModelFields/String.html +1 -1
  45. data/doc/Compony/ModelFields/Text.html +1 -1
  46. data/doc/Compony/ModelFields/Time.html +1 -1
  47. data/doc/Compony/ModelFields/Url.html +1 -1
  48. data/doc/Compony/ModelFields.html +1 -1
  49. data/doc/Compony/ModelMixin.html +1 -1
  50. data/doc/Compony/NaturalOrdering.html +14 -6
  51. data/doc/Compony/RequestContext.html +16 -4
  52. data/doc/Compony/Version.html +1 -1
  53. data/doc/Compony/ViewHelpers.html +1 -1
  54. data/doc/Compony.html +1 -1
  55. data/doc/ComponyController.html +1 -1
  56. data/doc/_index.html +1 -1
  57. data/doc/file.README.html +10 -1
  58. data/doc/index.html +10 -1
  59. data/doc/method_list.html +69 -61
  60. data/doc/top-level-namespace.html +1 -1
  61. data/lib/compony/component.rb +14 -2
  62. data/lib/compony/components/destroy.rb +9 -1
  63. data/lib/compony/components/form.rb +16 -5
  64. data/lib/compony/components/new.rb +1 -0
  65. data/lib/compony/natural_ordering.rb +6 -2
  66. data/lib/compony/request_context.rb +8 -2
  67. metadata +2 -2
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Wed May 29 15:53:00 2024 by
147
+ Generated on Fri May 31 14:28:30 2024 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.2.2).
150
150
  </div>
@@ -230,7 +230,7 @@
230
230
  </div>
231
231
 
232
232
  <div id="footer">
233
- Generated on Wed May 29 15:53:00 2024 by
233
+ Generated on Fri May 31 14:28:30 2024 by
234
234
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
235
235
  0.9.34 (ruby-3.2.2).
236
236
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Wed May 29 15:53:00 2024 by
147
+ Generated on Fri May 31 14:28:30 2024 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.2.2).
150
150
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Wed May 29 15:53:00 2024 by
147
+ Generated on Fri May 31 14:28:30 2024 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.2.2).
150
150
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Wed May 29 15:53:00 2024 by
225
+ Generated on Fri May 31 14:28:30 2024 by
226
226
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.34 (ruby-3.2.2).
228
228
  </div>
@@ -291,7 +291,7 @@
291
291
  </div>
292
292
 
293
293
  <div id="footer">
294
- Generated on Wed May 29 15:53:00 2024 by
294
+ Generated on Fri May 31 14:28:30 2024 by
295
295
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
296
296
  0.9.34 (ruby-3.2.2).
297
297
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Wed May 29 15:53:00 2024 by
225
+ Generated on Fri May 31 14:28:30 2024 by
226
226
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.34 (ruby-3.2.2).
228
228
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Wed May 29 15:53:00 2024 by
147
+ Generated on Fri May 31 14:28:30 2024 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.2.2).
150
150
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Wed May 29 15:53:00 2024 by
147
+ Generated on Fri May 31 14:28:30 2024 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.2.2).
150
150
  </div>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Wed May 29 15:53:00 2024 by
147
+ Generated on Fri May 31 14:28:30 2024 by
148
148
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.9.34 (ruby-3.2.2).
150
150
  </div>
@@ -230,7 +230,7 @@
230
230
  </div>
231
231
 
232
232
  <div id="footer">
233
- Generated on Wed May 29 15:53:00 2024 by
233
+ Generated on Fri May 31 14:28:30 2024 by
234
234
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
235
235
  0.9.34 (ruby-3.2.2).
236
236
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Wed May 29 15:53:00 2024 by
119
+ Generated on Fri May 31 14:28:29 2024 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.34 (ruby-3.2.2).
122
122
  </div>
@@ -514,7 +514,7 @@
514
514
  </div>
515
515
 
516
516
  <div id="footer">
517
- Generated on Wed May 29 15:53:00 2024 by
517
+ Generated on Fri May 31 14:28:29 2024 by
518
518
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
519
519
  0.9.34 (ruby-3.2.2).
520
520
  </div>
@@ -141,7 +141,7 @@
141
141
  <li class="public ">
142
142
  <span class="summary_signature">
143
143
 
144
- <a href="#natural_push-instance_method" title="#natural_push (instance method)">#<strong>natural_push</strong>(name, payload, before: nil, **kwargs) &#x21d2; Object </a>
144
+ <a href="#natural_push-instance_method" title="#natural_push (instance method)">#<strong>natural_push</strong>(name, payload = :missing, before: nil, **kwargs) &#x21d2; Object </a>
145
145
 
146
146
 
147
147
 
@@ -173,7 +173,7 @@
173
173
  <div class="method_details first">
174
174
  <h3 class="signature first" id="natural_push-instance_method">
175
175
 
176
- #<strong>natural_push</strong>(name, payload, before: nil, **kwargs) &#x21d2; <tt>Object</tt>
176
+ #<strong>natural_push</strong>(name, payload = :missing, before: nil, **kwargs) &#x21d2; <tt>Object</tt>
177
177
 
178
178
 
179
179
 
@@ -230,26 +230,34 @@
230
230
  51
231
231
  52
232
232
  53
233
- 54</pre>
233
+ 54
234
+ 55
235
+ 56
236
+ 57
237
+ 58</pre>
234
238
  </td>
235
239
  <td>
236
240
  <pre class="code"><span class="info file"># File 'lib/compony/natural_ordering.rb', line 18</span>
237
241
 
238
- <span class='kw'>def</span> <span class='id identifier rubyid_natural_push'>natural_push</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_payload'>payload</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
242
+ <span class='kw'>def</span> <span class='id identifier rubyid_natural_push'>natural_push</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_payload'>payload</span> <span class='op'>=</span> <span class='symbol'>:missing</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
239
243
  <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
240
244
  <span class='id identifier rubyid_before_name'>before_name</span> <span class='op'>=</span> <span class='id identifier rubyid_before'>before</span><span class='op'>&amp;.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
241
245
  <span class='id identifier rubyid_old_kwargs'>old_kwargs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
246
+ <span class='id identifier rubyid_old_payload'>old_payload</span> <span class='op'>=</span> <span class='kw'>nil</span>
242
247
 
243
248
  <span class='comment'># Fetch existing element if any
244
249
  </span> <span class='id identifier rubyid_existing_index'>existing_index</span> <span class='op'>=</span> <span class='id identifier rubyid_find_index'>find_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_el'>el</span><span class='op'>|</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_name'>name</span> <span class='rbrace'>}</span>
245
250
  <span class='kw'>if</span> <span class='id identifier rubyid_existing_index'>existing_index</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
246
251
  <span class='comment'># Copy all non-mentionned kwargs from the element we are about to overwrite
247
252
  </span> <span class='id identifier rubyid_old_kwargs'>old_kwargs</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_existing_index'>existing_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_except'>except</span><span class='lparen'>(</span><span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:payload</span><span class='rparen'>)</span>
253
+ <span class='id identifier rubyid_old_payload'>old_payload</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_existing_index'>existing_index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_payload'>payload</span>
248
254
 
249
255
  <span class='comment'># Replacing an existing element with a before: directive - must delete before calculating indices
250
256
  </span> <span class='kw'>if</span> <span class='id identifier rubyid_before_name'>before_name</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
251
257
  <span class='id identifier rubyid_delete_at'>delete_at</span><span class='lparen'>(</span><span class='id identifier rubyid_existing_index'>existing_index</span><span class='rparen'>)</span>
252
258
  <span class='kw'>end</span>
259
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_payload'>payload</span> <span class='op'>==</span> <span class='symbol'>:missing</span>
260
+ <span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot insert new element </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> without a payload (payload can only omitted if overriding another element) in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
253
261
  <span class='kw'>end</span>
254
262
 
255
263
  <span class='comment'># Fetch before element
@@ -258,7 +266,7 @@
258
266
  <span class='kw'>end</span>
259
267
 
260
268
  <span class='comment'># Create the element to insert
261
- </span> <span class='id identifier rubyid_element'>element</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="MethodAccessibleHash.html" title="Compony::MethodAccessibleHash (class)">MethodAccessibleHash</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="MethodAccessibleHash.html#initialize-instance_method" title="Compony::MethodAccessibleHash#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>payload:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_old_kwargs'>old_kwargs</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span><span class='rparen'>)</span>
269
+ </span> <span class='id identifier rubyid_element'>element</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="MethodAccessibleHash.html" title="Compony::MethodAccessibleHash (class)">MethodAccessibleHash</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="MethodAccessibleHash.html#initialize-instance_method" title="Compony::MethodAccessibleHash#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>payload:</span> <span class='id identifier rubyid_payload'>payload</span> <span class='op'>==</span> <span class='symbol'>:missing</span> <span class='op'>?</span> <span class='id identifier rubyid_old_payload'>old_payload</span> <span class='op'>:</span> <span class='id identifier rubyid_payload'>payload</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_old_kwargs'>old_kwargs</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span><span class='rparen'>)</span>
262
270
 
263
271
  <span class='comment'># Insert new element
264
272
  </span> <span class='kw'>if</span> <span class='id identifier rubyid_before_index'>before_index</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
@@ -282,7 +290,7 @@
282
290
  </div>
283
291
 
284
292
  <div id="footer">
285
- Generated on Wed May 29 15:53:00 2024 by
293
+ Generated on Fri May 31 14:28:30 2024 by
286
294
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
287
295
  0.9.34 (ruby-3.2.2).
288
296
  </div>
@@ -697,7 +697,13 @@
697
697
  48
698
698
  49
699
699
  50
700
- 51</pre>
700
+ 51
701
+ 52
702
+ 53
703
+ 54
704
+ 55
705
+ 56
706
+ 57</pre>
701
707
  </td>
702
708
  <td>
703
709
  <pre class="code"><span class="info file"># File 'lib/compony/request_context.rb', line 46</span>
@@ -705,8 +711,14 @@
705
711
  <span class='kw'>def</span> <span class='id identifier rubyid_content'>content</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
706
712
  <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
707
713
  <span class='id identifier rubyid_content_block'>content_block</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_content_blocks'>content_blocks</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_el'>el</span><span class='op'>|</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_name'>name</span> <span class='rbrace'>}</span> <span class='op'>||</span> <span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Content block </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> not found in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
708
- <span class='comment'># A fresh RequestContext is needed due to Rails&#39; buffer
709
- </span> <span class='id identifier rubyid_concat'>concat</span> <span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Compony::RequestContext (class)">RequestContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Compony::RequestContext#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_controller'>controller</span><span class='comma'>,</span> <span class='label'>helpers:</span><span class='comma'>,</span> <span class='label'>locals:</span> <span class='id identifier rubyid_local_assigns'>local_assigns</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_content_block'>content_block</span><span class='period'>.</span><span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
714
+ <span class='comment'># We have to clear Rails&#39; output_buffer to prevent double rendering of blocks. To achieve this, a fresh render context is instanciated.
715
+ </span> <span class='id identifier rubyid_concat'>concat</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_render_to_string'>render_to_string</span><span class='lparen'>(</span>
716
+ <span class='label'>type:</span> <span class='symbol'>:dyny</span><span class='comma'>,</span>
717
+ <span class='label'>locals:</span> <span class='lbrace'>{</span> <span class='label'>render_component:</span> <span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='label'>render_controller:</span> <span class='id identifier rubyid_controller'>controller</span><span class='comma'>,</span> <span class='label'>render_locals:</span> <span class='id identifier rubyid_local_assigns'>local_assigns</span><span class='comma'>,</span> <span class='label'>render_block:</span> <span class='id identifier rubyid_content_block'>content_block</span> <span class='rbrace'>}</span><span class='comma'>,</span>
718
+ <span class='label'>inline:</span> <span class='heredoc_beg'>&lt;&lt;~RUBY</span>
719
+ <span class='tstring_content'> Compony::RequestContext.new(render_component, render_controller, helpers: self, locals: local_assigns).evaluate_with_backfire(&amp;render_block.payload)
720
+ </span><span class='heredoc_end'> RUBY
721
+ </span> <span class='rparen'>)</span>
710
722
  <span class='kw'>end</span></pre>
711
723
  </td>
712
724
  </tr>
@@ -852,7 +864,7 @@
852
864
  </div>
853
865
 
854
866
  <div id="footer">
855
- Generated on Wed May 29 15:53:00 2024 by
867
+ Generated on Fri May 31 14:28:30 2024 by
856
868
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
857
869
  0.9.34 (ruby-3.2.2).
858
870
  </div>
@@ -129,7 +129,7 @@
129
129
  </div>
130
130
 
131
131
  <div id="footer">
132
- Generated on Wed May 29 15:53:00 2024 by
132
+ Generated on Fri May 31 14:28:29 2024 by
133
133
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
134
  0.9.34 (ruby-3.2.2).
135
135
  </div>
@@ -433,7 +433,7 @@
433
433
  </div>
434
434
 
435
435
  <div id="footer">
436
- Generated on Wed May 29 15:53:00 2024 by
436
+ Generated on Fri May 31 14:28:29 2024 by
437
437
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
438
438
  0.9.34 (ruby-3.2.2).
439
439
  </div>
data/doc/Compony.html CHANGED
@@ -2146,7 +2146,7 @@
2146
2146
  </div>
2147
2147
 
2148
2148
  <div id="footer">
2149
- Generated on Wed May 29 15:53:00 2024 by
2149
+ Generated on Fri May 31 14:28:29 2024 by
2150
2150
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2151
2151
  0.9.34 (ruby-3.2.2).
2152
2152
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Wed May 29 15:53:00 2024 by
117
+ Generated on Fri May 31 14:28:30 2024 by
118
118
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.34 (ruby-3.2.2).
120
120
  </div>
data/doc/_index.html CHANGED
@@ -566,7 +566,7 @@
566
566
  </div>
567
567
 
568
568
  <div id="footer">
569
- Generated on Wed May 29 15:52:58 2024 by
569
+ Generated on Fri May 31 14:28:27 2024 by
570
570
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
571
571
  0.9.34 (ruby-3.2.2).
572
572
  </div>
data/doc/file.README.html CHANGED
@@ -555,6 +555,15 @@
555
555
  <pre class="code ruby"><code class="ruby">&lt;div class=&quot;card card-body&quot;&gt;&lt;h1&gt;Hello&lt;/h1&gt;&lt;p&gt;Welcome to my site.&lt;/p&gt;&lt;/div&gt;
556
556
  </code></pre>
557
557
 
558
+ <h5 id="label-Removing+content+blocks">Removing content blocks</h5>
559
+
560
+ <p>If a component’s parent class defines a content block that is undesired in a subclass component, the content block can be removed as follows:</p>
561
+
562
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_setup'>setup</span> <span class='kw'>do</span>
563
+ <span class='id identifier rubyid_remove_content'>remove_content</span> <span class='symbol'>:some_content_defined_in_parent</span> <span class='comment'># This component will now behave as if this content block was never declared in its parent.
564
+ </span><span class='kw'>end</span>
565
+ </code></pre>
566
+
558
567
  <h4 id="label-Redirecting+away+-2F+Intercepting+rendering">Redirecting away / Intercepting rendering</h4>
559
568
 
560
569
  <p>Immediately before the <code>content</code> block(s) are evaluated, another chain of blocks is evaluated if present: <code>before_render</code>. If on of these blocks creates a reponse body in the Rails controller, the subsequent <code>before_render</code> blocks and all <code>content</code> blocks are skipped.</p>
@@ -1612,7 +1621,7 @@ my_button = Compony.button(:index, :users, enabled: -&gt; { |controller| control
1612
1621
  </div></div>
1613
1622
 
1614
1623
  <div id="footer">
1615
- Generated on Wed May 29 15:53:00 2024 by
1624
+ Generated on Fri May 31 14:28:29 2024 by
1616
1625
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1617
1626
  0.9.34 (ruby-3.2.2).
1618
1627
  </div>
data/doc/index.html CHANGED
@@ -555,6 +555,15 @@
555
555
  <pre class="code ruby"><code class="ruby">&lt;div class=&quot;card card-body&quot;&gt;&lt;h1&gt;Hello&lt;/h1&gt;&lt;p&gt;Welcome to my site.&lt;/p&gt;&lt;/div&gt;
556
556
  </code></pre>
557
557
 
558
+ <h5 id="label-Removing+content+blocks">Removing content blocks</h5>
559
+
560
+ <p>If a component’s parent class defines a content block that is undesired in a subclass component, the content block can be removed as follows:</p>
561
+
562
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_setup'>setup</span> <span class='kw'>do</span>
563
+ <span class='id identifier rubyid_remove_content'>remove_content</span> <span class='symbol'>:some_content_defined_in_parent</span> <span class='comment'># This component will now behave as if this content block was never declared in its parent.
564
+ </span><span class='kw'>end</span>
565
+ </code></pre>
566
+
558
567
  <h4 id="label-Redirecting+away+-2F+Intercepting+rendering">Redirecting away / Intercepting rendering</h4>
559
568
 
560
569
  <p>Immediately before the <code>content</code> block(s) are evaluated, another chain of blocks is evaluated if present: <code>before_render</code>. If on of these blocks creates a reponse body in the Rails controller, the subsequent <code>before_render</code> blocks and all <code>content</code> blocks are skipped.</p>
@@ -1612,7 +1621,7 @@ my_button = Compony.button(:index, :users, enabled: -&gt; { |controller| control
1612
1621
  </div></div>
1613
1622
 
1614
1623
  <div id="footer">
1615
- Generated on Wed May 29 15:52:59 2024 by
1624
+ Generated on Fri May 31 14:28:28 2024 by
1616
1625
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1617
1626
  0.9.34 (ruby-3.2.2).
1618
1627
  </div>