compony 0.3.0 → 0.3.2

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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -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 +244 -56
  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 +18 -18
  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 +16 -0
  60. data/doc/top-level-namespace.html +1 -1
  61. data/lib/compony/component.rb +25 -2
  62. data/lib/compony/components/destroy.rb +9 -1
  63. data/lib/compony/components/edit.rb +4 -0
  64. data/lib/compony/components/form.rb +16 -5
  65. data/lib/compony/components/new.rb +1 -0
  66. data/lib/compony/natural_ordering.rb +6 -2
  67. data/lib/compony/request_context.rb +8 -2
  68. metadata +2 -2
@@ -276,7 +276,7 @@
276
276
 
277
277
 
278
278
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
279
- <p class="inherited"><span class='object_link'><a href="../Component.html#action-instance_method" title="Compony::Component#action (method)">#action</a></span>, <span class='object_link'><a href="../Component.html#before_render-instance_method" title="Compony::Component#before_render (method)">#before_render</a></span>, <span class='object_link'><a href="../Component.html#comp_cst-instance_method" title="Compony::Component#comp_cst (method)">#comp_cst</a></span>, <span class='object_link'><a href="../Component.html#comp_name-instance_method" title="Compony::Component#comp_name (method)">#comp_name</a></span>, <span class='object_link'><a href="../Component.html#content-instance_method" title="Compony::Component#content (method)">#content</a></span>, <span class='object_link'><a href="../Component.html#family_cst-instance_method" title="Compony::Component#family_cst (method)">#family_cst</a></span>, <span class='object_link'><a href="../Component.html#family_name-instance_method" title="Compony::Component#family_name (method)">#family_name</a></span>, <span class='object_link'><a href="../Component.html#id-instance_method" title="Compony::Component#id (method)">#id</a></span>, <span class='object_link'><a href="../Component.html#initialize-instance_method" title="Compony::Component#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Component.html#inspect-instance_method" title="Compony::Component#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="../Component.html#param_name-instance_method" title="Compony::Component#param_name (method)">#param_name</a></span>, <span class='object_link'><a href="../Component.html#path-instance_method" title="Compony::Component#path (method)">#path</a></span>, <span class='object_link'><a href="../Component.html#path_hash-instance_method" title="Compony::Component#path_hash (method)">#path_hash</a></span>, <span class='object_link'><a href="../Component.html#render-instance_method" title="Compony::Component#render (method)">#render</a></span>, <span class='object_link'><a href="../Component.html#render_actions-instance_method" title="Compony::Component#render_actions (method)">#render_actions</a></span>, <span class='object_link'><a href="../Component.html#resourceful%3F-instance_method" title="Compony::Component#resourceful? (method)">#resourceful?</a></span>, <span class='object_link'><a href="../Component.html#root_comp-instance_method" title="Compony::Component#root_comp (method)">#root_comp</a></span>, <span class='object_link'><a href="../Component.html#root_comp%3F-instance_method" title="Compony::Component#root_comp? (method)">#root_comp?</a></span>, <span class='object_link'><a href="../Component.html#setup-class_method" title="Compony::Component.setup (method)">setup</a></span>, <span class='object_link'><a href="../Component.html#skip_action-instance_method" title="Compony::Component#skip_action (method)">#skip_action</a></span>, <span class='object_link'><a href="../Component.html#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
279
+ <p class="inherited"><span class='object_link'><a href="../Component.html#action-instance_method" title="Compony::Component#action (method)">#action</a></span>, <span class='object_link'><a href="../Component.html#before_render-instance_method" title="Compony::Component#before_render (method)">#before_render</a></span>, <span class='object_link'><a href="../Component.html#comp_cst-instance_method" title="Compony::Component#comp_cst (method)">#comp_cst</a></span>, <span class='object_link'><a href="../Component.html#comp_name-instance_method" title="Compony::Component#comp_name (method)">#comp_name</a></span>, <span class='object_link'><a href="../Component.html#content-instance_method" title="Compony::Component#content (method)">#content</a></span>, <span class='object_link'><a href="../Component.html#family_cst-instance_method" title="Compony::Component#family_cst (method)">#family_cst</a></span>, <span class='object_link'><a href="../Component.html#family_name-instance_method" title="Compony::Component#family_name (method)">#family_name</a></span>, <span class='object_link'><a href="../Component.html#id-instance_method" title="Compony::Component#id (method)">#id</a></span>, <span class='object_link'><a href="../Component.html#initialize-instance_method" title="Compony::Component#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Component.html#inspect-instance_method" title="Compony::Component#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="../Component.html#param_name-instance_method" title="Compony::Component#param_name (method)">#param_name</a></span>, <span class='object_link'><a href="../Component.html#path-instance_method" title="Compony::Component#path (method)">#path</a></span>, <span class='object_link'><a href="../Component.html#path_hash-instance_method" title="Compony::Component#path_hash (method)">#path_hash</a></span>, <span class='object_link'><a href="../Component.html#remove_content-instance_method" title="Compony::Component#remove_content (method)">#remove_content</a></span>, <span class='object_link'><a href="../Component.html#remove_content!-instance_method" title="Compony::Component#remove_content! (method)">#remove_content!</a></span>, <span class='object_link'><a href="../Component.html#render-instance_method" title="Compony::Component#render (method)">#render</a></span>, <span class='object_link'><a href="../Component.html#render_actions-instance_method" title="Compony::Component#render_actions (method)">#render_actions</a></span>, <span class='object_link'><a href="../Component.html#resourceful%3F-instance_method" title="Compony::Component#resourceful? (method)">#resourceful?</a></span>, <span class='object_link'><a href="../Component.html#root_comp-instance_method" title="Compony::Component#root_comp (method)">#root_comp</a></span>, <span class='object_link'><a href="../Component.html#root_comp%3F-instance_method" title="Compony::Component#root_comp? (method)">#root_comp?</a></span>, <span class='object_link'><a href="../Component.html#setup-class_method" title="Compony::Component.setup (method)">setup</a></span>, <span class='object_link'><a href="../Component.html#skip_action-instance_method" title="Compony::Component#skip_action (method)">#skip_action</a></span>, <span class='object_link'><a href="../Component.html#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
280
280
 
281
281
 
282
282
  <div id="instance_method_details" class="method_details_list">
@@ -309,12 +309,12 @@
309
309
  <pre class="lines">
310
310
 
311
311
 
312
- 95
313
312
  96
314
- 97</pre>
313
+ 97
314
+ 98</pre>
315
315
  </td>
316
316
  <td>
317
- <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 95</span>
317
+ <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 96</span>
318
318
 
319
319
  <span class='kw'>def</span> <span class='id identifier rubyid_on_create_failed_respond'>on_create_failed_respond</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
320
320
  <span class='ivar'>@on_create_failed_respond_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -350,12 +350,12 @@
350
350
  <pre class="lines">
351
351
 
352
352
 
353
- 80
354
353
  81
355
- 82</pre>
354
+ 82
355
+ 83</pre>
356
356
  </td>
357
357
  <td>
358
- <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 80</span>
358
+ <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 81</span>
359
359
 
360
360
  <span class='kw'>def</span> <span class='id identifier rubyid_on_created'>on_created</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
361
361
  <span class='ivar'>@on_created_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -391,12 +391,12 @@
391
391
  <pre class="lines">
392
392
 
393
393
 
394
- 90
395
394
  91
396
- 92</pre>
395
+ 92
396
+ 93</pre>
397
397
  </td>
398
398
  <td>
399
- <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 90</span>
399
+ <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 91</span>
400
400
 
401
401
  <span class='kw'>def</span> <span class='id identifier rubyid_on_created_redirect_path'>on_created_redirect_path</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
402
402
  <span class='ivar'>@on_created_redirect_path_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -432,12 +432,12 @@
432
432
  <pre class="lines">
433
433
 
434
434
 
435
- 85
436
435
  86
437
- 87</pre>
436
+ 87
437
+ 88</pre>
438
438
  </td>
439
439
  <td>
440
- <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 85</span>
440
+ <pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 86</span>
441
441
 
442
442
  <span class='kw'>def</span> <span class='id identifier rubyid_on_created_respond'>on_created_respond</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
443
443
  <span class='ivar'>@on_created_respond_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -452,7 +452,7 @@
452
452
  </div>
453
453
 
454
454
  <div id="footer">
455
- Generated on Wed May 29 15:53:00 2024 by
455
+ Generated on Sat Jun 1 14:22:43 2024 by
456
456
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
457
457
  0.9.34 (ruby-3.2.2).
458
458
  </div>
@@ -271,7 +271,7 @@
271
271
 
272
272
 
273
273
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
274
- <p class="inherited"><span class='object_link'><a href="../Component.html#action-instance_method" title="Compony::Component#action (method)">#action</a></span>, <span class='object_link'><a href="../Component.html#before_render-instance_method" title="Compony::Component#before_render (method)">#before_render</a></span>, <span class='object_link'><a href="../Component.html#comp_cst-instance_method" title="Compony::Component#comp_cst (method)">#comp_cst</a></span>, <span class='object_link'><a href="../Component.html#comp_name-instance_method" title="Compony::Component#comp_name (method)">#comp_name</a></span>, <span class='object_link'><a href="../Component.html#content-instance_method" title="Compony::Component#content (method)">#content</a></span>, <span class='object_link'><a href="../Component.html#family_cst-instance_method" title="Compony::Component#family_cst (method)">#family_cst</a></span>, <span class='object_link'><a href="../Component.html#family_name-instance_method" title="Compony::Component#family_name (method)">#family_name</a></span>, <span class='object_link'><a href="../Component.html#id-instance_method" title="Compony::Component#id (method)">#id</a></span>, <span class='object_link'><a href="../Component.html#inspect-instance_method" title="Compony::Component#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="../Component.html#param_name-instance_method" title="Compony::Component#param_name (method)">#param_name</a></span>, <span class='object_link'><a href="../Component.html#path-instance_method" title="Compony::Component#path (method)">#path</a></span>, <span class='object_link'><a href="../Component.html#path_hash-instance_method" title="Compony::Component#path_hash (method)">#path_hash</a></span>, <span class='object_link'><a href="../Component.html#render-instance_method" title="Compony::Component#render (method)">#render</a></span>, <span class='object_link'><a href="../Component.html#render_actions-instance_method" title="Compony::Component#render_actions (method)">#render_actions</a></span>, <span class='object_link'><a href="../Component.html#resourceful%3F-instance_method" title="Compony::Component#resourceful? (method)">#resourceful?</a></span>, <span class='object_link'><a href="../Component.html#root_comp-instance_method" title="Compony::Component#root_comp (method)">#root_comp</a></span>, <span class='object_link'><a href="../Component.html#root_comp%3F-instance_method" title="Compony::Component#root_comp? (method)">#root_comp?</a></span>, <span class='object_link'><a href="../Component.html#setup-class_method" title="Compony::Component.setup (method)">setup</a></span>, <span class='object_link'><a href="../Component.html#skip_action-instance_method" title="Compony::Component#skip_action (method)">#skip_action</a></span>, <span class='object_link'><a href="../Component.html#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
274
+ <p class="inherited"><span class='object_link'><a href="../Component.html#action-instance_method" title="Compony::Component#action (method)">#action</a></span>, <span class='object_link'><a href="../Component.html#before_render-instance_method" title="Compony::Component#before_render (method)">#before_render</a></span>, <span class='object_link'><a href="../Component.html#comp_cst-instance_method" title="Compony::Component#comp_cst (method)">#comp_cst</a></span>, <span class='object_link'><a href="../Component.html#comp_name-instance_method" title="Compony::Component#comp_name (method)">#comp_name</a></span>, <span class='object_link'><a href="../Component.html#content-instance_method" title="Compony::Component#content (method)">#content</a></span>, <span class='object_link'><a href="../Component.html#family_cst-instance_method" title="Compony::Component#family_cst (method)">#family_cst</a></span>, <span class='object_link'><a href="../Component.html#family_name-instance_method" title="Compony::Component#family_name (method)">#family_name</a></span>, <span class='object_link'><a href="../Component.html#id-instance_method" title="Compony::Component#id (method)">#id</a></span>, <span class='object_link'><a href="../Component.html#inspect-instance_method" title="Compony::Component#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="../Component.html#param_name-instance_method" title="Compony::Component#param_name (method)">#param_name</a></span>, <span class='object_link'><a href="../Component.html#path-instance_method" title="Compony::Component#path (method)">#path</a></span>, <span class='object_link'><a href="../Component.html#path_hash-instance_method" title="Compony::Component#path_hash (method)">#path_hash</a></span>, <span class='object_link'><a href="../Component.html#remove_content-instance_method" title="Compony::Component#remove_content (method)">#remove_content</a></span>, <span class='object_link'><a href="../Component.html#remove_content!-instance_method" title="Compony::Component#remove_content! (method)">#remove_content!</a></span>, <span class='object_link'><a href="../Component.html#render-instance_method" title="Compony::Component#render (method)">#render</a></span>, <span class='object_link'><a href="../Component.html#render_actions-instance_method" title="Compony::Component#render_actions (method)">#render_actions</a></span>, <span class='object_link'><a href="../Component.html#resourceful%3F-instance_method" title="Compony::Component#resourceful? (method)">#resourceful?</a></span>, <span class='object_link'><a href="../Component.html#root_comp-instance_method" title="Compony::Component#root_comp (method)">#root_comp</a></span>, <span class='object_link'><a href="../Component.html#root_comp%3F-instance_method" title="Compony::Component#root_comp? (method)">#root_comp?</a></span>, <span class='object_link'><a href="../Component.html#setup-class_method" title="Compony::Component.setup (method)">setup</a></span>, <span class='object_link'><a href="../Component.html#skip_action-instance_method" title="Compony::Component#skip_action (method)">#skip_action</a></span>, <span class='object_link'><a href="../Component.html#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
275
275
  <div id="constructor_details" class="method_details_list">
276
276
  <h2>Constructor Details</h2>
277
277
 
@@ -518,7 +518,7 @@
518
518
  </div>
519
519
 
520
520
  <div id="footer">
521
- Generated on Wed May 29 15:53:00 2024 by
521
+ Generated on Sat Jun 1 14:22:43 2024 by
522
522
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
523
523
  0.9.34 (ruby-3.2.2).
524
524
  </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 Sat Jun 1 14:22:42 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>
@@ -126,7 +126,7 @@
126
126
  </div>
127
127
 
128
128
  <div id="footer">
129
- Generated on Wed May 29 15:53:00 2024 by
129
+ Generated on Sat Jun 1 14:22:42 2024 by
130
130
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
131
131
  0.9.34 (ruby-3.2.2).
132
132
  </div>
@@ -123,7 +123,7 @@
123
123
  </div>
124
124
 
125
125
  <div id="footer">
126
- Generated on Wed May 29 15:53:00 2024 by
126
+ Generated on Sat Jun 1 14:22:42 2024 by
127
127
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
128
128
  0.9.34 (ruby-3.2.2).
129
129
  </div>
@@ -443,7 +443,7 @@ instance_of_a_hash.roo --&gt; nil
443
443
  </div>
444
444
 
445
445
  <div id="footer">
446
- Generated on Wed May 29 15:53:00 2024 by
446
+ Generated on Sat Jun 1 14:22:43 2024 by
447
447
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
448
448
  0.9.34 (ruby-3.2.2).
449
449
  </div>
@@ -377,7 +377,7 @@
377
377
  </div>
378
378
 
379
379
  <div id="footer">
380
- Generated on Wed May 29 15:53:01 2024 by
380
+ Generated on Sat Jun 1 14:22:43 2024 by
381
381
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
382
382
  0.9.34 (ruby-3.2.2).
383
383
  </div>
@@ -603,7 +603,7 @@
603
603
  </div>
604
604
 
605
605
  <div id="footer">
606
- Generated on Wed May 29 15:53:01 2024 by
606
+ Generated on Sat Jun 1 14:22:43 2024 by
607
607
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
608
608
  0.9.34 (ruby-3.2.2).
609
609
  </div>
@@ -295,7 +295,7 @@
295
295
  </div>
296
296
 
297
297
  <div id="footer">
298
- Generated on Wed May 29 15:53:00 2024 by
298
+ Generated on Sat Jun 1 14:22:43 2024 by
299
299
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
300
300
  0.9.34 (ruby-3.2.2).
301
301
  </div>
@@ -1056,7 +1056,7 @@
1056
1056
  </div>
1057
1057
 
1058
1058
  <div id="footer">
1059
- Generated on Wed May 29 15:53:00 2024 by
1059
+ Generated on Sat Jun 1 14:22:43 2024 by
1060
1060
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1061
1061
  0.9.34 (ruby-3.2.2).
1062
1062
  </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 Sat Jun 1 14:22:43 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>
@@ -289,7 +289,7 @@
289
289
  </div>
290
290
 
291
291
  <div id="footer">
292
- Generated on Wed May 29 15:53:00 2024 by
292
+ Generated on Sat Jun 1 14:22:43 2024 by
293
293
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
294
294
  0.9.34 (ruby-3.2.2).
295
295
  </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 Sat Jun 1 14:22:43 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>
@@ -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 Sat Jun 1 14:22:43 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>
@@ -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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:42 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 Sat Jun 1 14:22:42 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:42 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 Sat Jun 1 14:22:42 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 Sat Jun 1 14:22:42 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 Sat Jun 1 14:22:43 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 Sat Jun 1 14:22:40 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>