compony 0.11.8 → 0.11.9

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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +36 -1
  3. data/CHANGELOG.md +31 -0
  4. data/CLAUDE.md +85 -0
  5. data/Gemfile.lock +1 -1
  6. data/README.md +13 -3
  7. data/VERSION +1 -1
  8. data/compony.gemspec +3 -3
  9. data/doc/ComponentGenerator.html +1 -1
  10. data/doc/Components.html +1 -1
  11. data/doc/ComponentsGenerator.html +1 -1
  12. data/doc/Compony/Component.html +54 -54
  13. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +109 -70
  16. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +64 -28
  17. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  18. data/doc/Compony/ComponentMixins/Default.html +1 -1
  19. data/doc/Compony/ComponentMixins/Resourceful.html +213 -74
  20. data/doc/Compony/ComponentMixins.html +1 -1
  21. data/doc/Compony/Components/Buttons/CssButton.html +1 -1
  22. data/doc/Compony/Components/Buttons/Link.html +1 -1
  23. data/doc/Compony/Components/Buttons.html +1 -1
  24. data/doc/Compony/Components/Destroy.html +83 -29
  25. data/doc/Compony/Components/Edit.html +110 -38
  26. data/doc/Compony/Components/Form.html +551 -208
  27. data/doc/Compony/Components/Index.html +1 -1
  28. data/doc/Compony/Components/List.html +3 -3
  29. data/doc/Compony/Components/New.html +110 -38
  30. data/doc/Compony/Components/Show.html +1 -1
  31. data/doc/Compony/Components/WithForm.html +194 -47
  32. data/doc/Compony/Components.html +1 -1
  33. data/doc/Compony/ControllerMixin.html +1 -1
  34. data/doc/Compony/Engine.html +1 -1
  35. data/doc/Compony/Intent.html +2 -2
  36. data/doc/Compony/ManageIntentsDsl.html +1 -1
  37. data/doc/Compony/MethodAccessibleHash.html +1 -1
  38. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  39. data/doc/Compony/ModelFields/Association.html +1 -1
  40. data/doc/Compony/ModelFields/Attachment.html +1 -1
  41. data/doc/Compony/ModelFields/Base.html +1 -1
  42. data/doc/Compony/ModelFields/Boolean.html +1 -1
  43. data/doc/Compony/ModelFields/Color.html +1 -1
  44. data/doc/Compony/ModelFields/Currency.html +1 -1
  45. data/doc/Compony/ModelFields/Date.html +1 -1
  46. data/doc/Compony/ModelFields/Datetime.html +1 -1
  47. data/doc/Compony/ModelFields/Decimal.html +1 -1
  48. data/doc/Compony/ModelFields/Email.html +1 -1
  49. data/doc/Compony/ModelFields/Float.html +1 -1
  50. data/doc/Compony/ModelFields/Integer.html +1 -1
  51. data/doc/Compony/ModelFields/Percentage.html +1 -1
  52. data/doc/Compony/ModelFields/Phone.html +1 -1
  53. data/doc/Compony/ModelFields/RichText.html +1 -1
  54. data/doc/Compony/ModelFields/String.html +1 -1
  55. data/doc/Compony/ModelFields/Text.html +1 -1
  56. data/doc/Compony/ModelFields/Time.html +1 -1
  57. data/doc/Compony/ModelFields/Url.html +1 -1
  58. data/doc/Compony/ModelFields.html +1 -1
  59. data/doc/Compony/ModelMixin.html +1 -1
  60. data/doc/Compony/NaturalOrdering.html +1 -1
  61. data/doc/Compony/RequestContext.html +1 -1
  62. data/doc/Compony/Version.html +1 -1
  63. data/doc/Compony/ViewHelpers.html +1 -1
  64. data/doc/Compony/VirtualModel.html +1 -1
  65. data/doc/Compony.html +1 -1
  66. data/doc/ComponyController.html +1 -1
  67. data/doc/_index.html +97 -1
  68. data/doc/file.CHANGELOG.html +758 -0
  69. data/doc/file.README.html +25 -4
  70. data/doc/file.basic_component.html +314 -0
  71. data/doc/file.cookbook.html +189 -0
  72. data/doc/file.destroy.html +105 -0
  73. data/doc/file.dsl_reference.html +672 -0
  74. data/doc/file.edit.html +109 -0
  75. data/doc/file.example.html +291 -0
  76. data/doc/file.example_advanced.html +257 -0
  77. data/doc/file.feasibility.html +115 -0
  78. data/doc/file.form.html +195 -0
  79. data/doc/file.generators.html +89 -0
  80. data/doc/file.glossary.html +217 -0
  81. data/doc/file.gotchas.html +222 -0
  82. data/doc/file.index.html +135 -0
  83. data/doc/file.inheritance.html +136 -0
  84. data/doc/file.installation.html +115 -0
  85. data/doc/file.integrations.html +218 -0
  86. data/doc/file.intents.html +265 -0
  87. data/doc/file.internal_datastructures.html +129 -0
  88. data/doc/file.list.html +253 -0
  89. data/doc/file.maintaining.html +127 -0
  90. data/doc/file.model_fields.html +137 -0
  91. data/doc/file.nesting.html +237 -0
  92. data/doc/file.new.html +109 -0
  93. data/doc/file.ownership.html +98 -0
  94. data/doc/file.patterns.html +669 -0
  95. data/doc/file.pre_built_components.html +99 -0
  96. data/doc/file.resourceful.html +181 -0
  97. data/doc/file.show.html +158 -0
  98. data/doc/file.standalone.html +233 -0
  99. data/doc/file.virtual_models.html +117 -0
  100. data/doc/file.with_form.html +157 -0
  101. data/doc/file_list.html +160 -0
  102. data/doc/guide/cookbook.md +41 -0
  103. data/doc/guide/dsl_reference.md +155 -0
  104. data/doc/guide/example_advanced.md +209 -0
  105. data/doc/guide/generators.md +1 -1
  106. data/doc/guide/glossary.md +42 -0
  107. data/doc/guide/gotchas.md +125 -0
  108. data/doc/guide/maintaining.md +64 -0
  109. data/doc/guide/patterns.md +681 -0
  110. data/doc/guide/pre_built_components/edit.md +1 -1
  111. data/doc/guide/pre_built_components/index.md +64 -1
  112. data/doc/guide/pre_built_components/list.md +111 -7
  113. data/doc/guide/pre_built_components/show.md +57 -2
  114. data/doc/guide/pre_built_components/with_form.md +56 -9
  115. data/doc/guide/pre_built_components.md +7 -2
  116. data/doc/guide/standalone.md +16 -1
  117. data/doc/index.html +25 -4
  118. data/doc/integrations.md +61 -0
  119. data/doc/llms.txt +62 -0
  120. data/doc/top-level-namespace.html +1 -1
  121. data/lib/compony/component.rb +8 -3
  122. data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +32 -15
  123. data/lib/compony/component_mixins/default/standalone/verb_dsl.rb +11 -3
  124. data/lib/compony/component_mixins/resourceful.rb +30 -16
  125. data/lib/compony/components/destroy.rb +21 -1
  126. data/lib/compony/components/edit.rb +25 -1
  127. data/lib/compony/components/form.rb +63 -21
  128. data/lib/compony/components/list.rb +1 -1
  129. data/lib/compony/components/new.rb +25 -1
  130. data/lib/compony/components/with_form.rb +20 -5
  131. data/lib/compony/intent.rb +1 -1
  132. metadata +43 -1
@@ -282,7 +282,7 @@
282
282
 
283
283
 
284
284
  <h2>
285
- Instance Method Summary
285
+ DSL
286
286
  <small><a href="#" class="summary_toggle">collapse</a></small>
287
287
  </h2>
288
288
 
@@ -291,7 +291,7 @@
291
291
  <li class="protected ">
292
292
  <span class="summary_signature">
293
293
 
294
- <a href="#after_assign_attributes-instance_method" title="#after_assign_attributes (instance method)">#<strong>after_assign_attributes</strong>(&amp;block) &#x21d2; Object </a>
294
+ <a href="#after_assign_attributes-instance_method" title="#after_assign_attributes (instance method)">#<strong>after_assign_attributes</strong> { ... } &#x21d2; void </a>
295
295
 
296
296
 
297
297
 
@@ -315,7 +315,7 @@
315
315
  <li class="protected ">
316
316
  <span class="summary_signature">
317
317
 
318
- <a href="#after_load_data-instance_method" title="#after_load_data (instance method)">#<strong>after_load_data</strong>(&amp;block) &#x21d2; Object </a>
318
+ <a href="#after_load_data-instance_method" title="#after_load_data (instance method)">#<strong>after_load_data</strong> { ... } &#x21d2; void </a>
319
319
 
320
320
 
321
321
 
@@ -330,7 +330,7 @@
330
330
 
331
331
 
332
332
  <span class="summary_desc"><div class='inline'>
333
- <p>DSL method Runs after loading data and before authorization for all standalone paths and verbs.</p>
333
+ <p>DSL method Runs after <code>load_data</code> and before authorization for all standalone paths and verbs.</p>
334
334
  </div></span>
335
335
 
336
336
  </li>
@@ -339,7 +339,7 @@
339
339
  <li class="protected ">
340
340
  <span class="summary_signature">
341
341
 
342
- <a href="#assign_attributes-instance_method" title="#assign_attributes (instance method)">#<strong>assign_attributes</strong>(&amp;block) &#x21d2; Object </a>
342
+ <a href="#assign_attributes-instance_method" title="#assign_attributes (instance method)">#<strong>assign_attributes</strong> { ... } &#x21d2; void </a>
343
343
 
344
344
 
345
345
 
@@ -354,7 +354,7 @@
354
354
 
355
355
 
356
356
  <span class="summary_desc"><div class='inline'>
357
- <p>DSL method Sets a default default assign_attributes block for all standalone paths and verbs.</p>
357
+ <p>DSL method Sets the default <code>assign_attributes</code> block for all standalone paths and verbs (overridable per verb in the VerbDsl).</p>
358
358
  </div></span>
359
359
 
360
360
  </li>
@@ -363,7 +363,7 @@
363
363
  <li class="public ">
364
364
  <span class="summary_signature">
365
365
 
366
- <a href="#data_class-instance_method" title="#data_class (instance method)">#<strong>data_class</strong>(new_data_class = nil) &#x21d2; Object </a>
366
+ <a href="#data_class-instance_method" title="#data_class (instance method)">#<strong>data_class</strong>(new_data_class = nil) &#x21d2; Class </a>
367
367
 
368
368
 
369
369
 
@@ -378,16 +378,16 @@
378
378
 
379
379
 
380
380
  <span class="summary_desc"><div class='inline'>
381
- <p>DSL method Sets or calculates the model class based on the component’s family name.</p>
381
+ <p>DSL method Sets or calculates the model class.</p>
382
382
  </div></span>
383
383
 
384
384
  </li>
385
385
 
386
386
 
387
- <li class="public ">
387
+ <li class="protected ">
388
388
  <span class="summary_signature">
389
389
 
390
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(data: nil, data_class: nil, **nargs) &#x21d2; Object </a>
390
+ <a href="#load_data-instance_method" title="#load_data (instance method)">#<strong>load_data</strong> { ... } &#x21d2; void </a>
391
391
 
392
392
 
393
393
 
@@ -395,21 +395,23 @@
395
395
 
396
396
 
397
397
 
398
-
398
+ <span class="note title protected">protected</span>
399
399
 
400
400
 
401
401
 
402
402
 
403
403
 
404
- <span class="summary_desc"><div class='inline'></div></span>
404
+ <span class="summary_desc"><div class='inline'>
405
+ <p>DSL method Sets the default <code>load_data</code> block for all standalone paths and verbs (overridable per verb in the VerbDsl).</p>
406
+ </div></span>
405
407
 
406
408
  </li>
407
409
 
408
410
 
409
- <li class="protected ">
411
+ <li class="public ">
410
412
  <span class="summary_signature">
411
413
 
412
- <a href="#load_data-instance_method" title="#load_data (instance method)">#<strong>load_data</strong>(&amp;block) &#x21d2; Object </a>
414
+ <a href="#resourceful%3F-instance_method" title="#resourceful? (instance method)">#<strong>resourceful?</strong> &#x21d2; Boolean </a>
413
415
 
414
416
 
415
417
 
@@ -417,23 +419,21 @@
417
419
 
418
420
 
419
421
 
420
- <span class="note title protected">protected</span>
422
+
421
423
 
422
424
 
423
425
 
424
426
 
425
427
 
426
- <span class="summary_desc"><div class='inline'>
427
- <p>DSL method Sets a default load_data block for all standalone paths and verbs.</p>
428
- </div></span>
428
+ <span class="summary_desc"><div class='inline'></div></span>
429
429
 
430
430
  </li>
431
431
 
432
432
 
433
- <li class="public ">
433
+ <li class="protected ">
434
434
  <span class="summary_signature">
435
435
 
436
- <a href="#resourceful%3F-instance_method" title="#resourceful? (instance method)">#<strong>resourceful?</strong> &#x21d2; Boolean </a>
436
+ <a href="#store_data-instance_method" title="#store_data (instance method)">#<strong>store_data</strong> { ... } &#x21d2; void </a>
437
437
 
438
438
 
439
439
 
@@ -441,21 +441,32 @@
441
441
 
442
442
 
443
443
 
444
-
444
+ <span class="note title protected">protected</span>
445
445
 
446
446
 
447
447
 
448
448
 
449
449
 
450
- <span class="summary_desc"><div class='inline'></div></span>
450
+ <span class="summary_desc"><div class='inline'>
451
+ <p>DSL method Sets the default <code>store_data</code> block for all standalone paths and verbs (overridable per verb in the VerbDsl).</p>
452
+ </div></span>
451
453
 
452
454
  </li>
453
455
 
454
456
 
455
- <li class="protected ">
457
+ </ul>
458
+
459
+ <h2>
460
+ Instance Method Summary
461
+ <small><a href="#" class="summary_toggle">collapse</a></small>
462
+ </h2>
463
+
464
+ <ul class="summary">
465
+
466
+ <li class="public ">
456
467
  <span class="summary_signature">
457
468
 
458
- <a href="#store_data-instance_method" title="#store_data (instance method)">#<strong>store_data</strong>(&amp;block) &#x21d2; Object </a>
469
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(data: nil, data_class: nil, **nargs) &#x21d2; Object </a>
459
470
 
460
471
 
461
472
 
@@ -463,15 +474,13 @@
463
474
 
464
475
 
465
476
 
466
- <span class="note title protected">protected</span>
477
+
467
478
 
468
479
 
469
480
 
470
481
 
471
482
 
472
- <span class="summary_desc"><div class='inline'>
473
- <p>DSL method Sets a default store_data block for all standalone paths and verbs.</p>
474
- </div></span>
483
+ <span class="summary_desc"><div class='inline'></div></span>
475
484
 
476
485
  </li>
477
486
 
@@ -742,7 +751,7 @@
742
751
  <div class="method_details first">
743
752
  <h3 class="signature first" id="after_assign_attributes-instance_method">
744
753
 
745
- #<strong>after_assign_attributes</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
754
+ #<strong>after_assign_attributes</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
746
755
 
747
756
 
748
757
 
@@ -750,14 +759,32 @@
750
759
 
751
760
  </h3><div class="docstring">
752
761
  <div class="discussion">
753
-
754
- <p>DSL method Runs after <code>assign_attributes</code> and before <code>store_data</code> for all standalone paths and verbs. Example use case: prefilling some fields for a form</p>
762
+ <p class="note returns_void">This method returns an undefined value.</p>
763
+ <p>DSL method Runs after <code>assign_attributes</code> and before <code>store_data</code> for all standalone paths and verbs. Example: prefill or derive fields before validation.</p>
755
764
 
756
765
 
757
766
  </div>
758
767
  </div>
759
768
  <div class="tags">
760
769
 
770
+ <p class="tag_title">Yields:</p>
771
+ <ul class="yield">
772
+
773
+ <li>
774
+
775
+
776
+ <span class='type'></span>
777
+
778
+
779
+
780
+
781
+ <div class='inline'>
782
+ <p>Runs in the component’s request context; may mutate <code>@data</code>.</p>
783
+ </div>
784
+
785
+ </li>
786
+
787
+ </ul>
761
788
 
762
789
  </div><table class="source_code">
763
790
  <tr>
@@ -765,12 +792,12 @@
765
792
  <pre class="lines">
766
793
 
767
794
 
768
- 70
769
- 71
770
- 72</pre>
795
+ 83
796
+ 84
797
+ 85</pre>
771
798
  </td>
772
799
  <td>
773
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 70</span>
800
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 83</span>
774
801
 
775
802
  <span class='kw'>def</span> <span class='id identifier rubyid_after_assign_attributes'>after_assign_attributes</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
776
803
  <span class='ivar'>@global_after_assign_attributes_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -783,7 +810,7 @@
783
810
  <div class="method_details ">
784
811
  <h3 class="signature " id="after_load_data-instance_method">
785
812
 
786
- #<strong>after_load_data</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
813
+ #<strong>after_load_data</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
787
814
 
788
815
 
789
816
 
@@ -791,14 +818,32 @@
791
818
 
792
819
  </h3><div class="docstring">
793
820
  <div class="discussion">
794
-
795
- <p>DSL method Runs after loading data and before authorization for all standalone paths and verbs. Example use case: if <code>load_data</code> produced an AR collection proxy, can still refine result here before <code>to_sql</code> is called.</p>
821
+ <p class="note returns_void">This method returns an undefined value.</p>
822
+ <p>DSL method Runs after <code>load_data</code> and before authorization for all standalone paths and verbs. Example: refine an AR collection produced by <code>load_data</code> before it is read.</p>
796
823
 
797
824
 
798
825
  </div>
799
826
  </div>
800
827
  <div class="tags">
801
828
 
829
+ <p class="tag_title">Yields:</p>
830
+ <ul class="yield">
831
+
832
+ <li>
833
+
834
+
835
+ <span class='type'></span>
836
+
837
+
838
+
839
+
840
+ <div class='inline'>
841
+ <p>Runs in the component’s request context; may refine <code>@data</code>.</p>
842
+ </div>
843
+
844
+ </li>
845
+
846
+ </ul>
802
847
 
803
848
  </div><table class="source_code">
804
849
  <tr>
@@ -806,12 +851,12 @@
806
851
  <pre class="lines">
807
852
 
808
853
 
809
- 53
810
- 54
811
- 55</pre>
854
+ 62
855
+ 63
856
+ 64</pre>
812
857
  </td>
813
858
  <td>
814
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 53</span>
859
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 62</span>
815
860
 
816
861
  <span class='kw'>def</span> <span class='id identifier rubyid_after_load_data'>after_load_data</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
817
862
  <span class='ivar'>@global_after_load_data_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -824,7 +869,7 @@
824
869
  <div class="method_details ">
825
870
  <h3 class="signature " id="assign_attributes-instance_method">
826
871
 
827
- #<strong>assign_attributes</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
872
+ #<strong>assign_attributes</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
828
873
 
829
874
 
830
875
 
@@ -832,14 +877,32 @@
832
877
 
833
878
  </h3><div class="docstring">
834
879
  <div class="discussion">
835
-
836
- <p>DSL method Sets a default default assign_attributes block for all standalone paths and verbs. Can be overwritten for a specific path and verb in the <span class='object_link'><a href="Default/Standalone/VerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">Default::Standalone::VerbDsl</a></span>. The block is expected to assign suitable <code>params</code> to attributes of <code>@data</code>.</p>
880
+ <p class="note returns_void">This method returns an undefined value.</p>
881
+ <p>DSL method Sets the default <code>assign_attributes</code> block for all standalone paths and verbs (overridable per verb in the VerbDsl). The block is expected to assign validated <code>params</code> to attributes of <code>@data</code>.</p>
837
882
 
838
883
 
839
884
  </div>
840
885
  </div>
841
886
  <div class="tags">
842
887
 
888
+ <p class="tag_title">Yields:</p>
889
+ <ul class="yield">
890
+
891
+ <li>
892
+
893
+
894
+ <span class='type'></span>
895
+
896
+
897
+
898
+
899
+ <div class='inline'>
900
+ <p>Runs in the component’s request context; assigns params onto <code>@data</code>.</p>
901
+ </div>
902
+
903
+ </li>
904
+
905
+ </ul>
843
906
 
844
907
  <p class="tag_title">See Also:</p>
845
908
  <ul class="see">
@@ -854,12 +917,12 @@
854
917
  <pre class="lines">
855
918
 
856
919
 
857
- 63
858
- 64
859
- 65</pre>
920
+ 73
921
+ 74
922
+ 75</pre>
860
923
  </td>
861
924
  <td>
862
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 63</span>
925
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 73</span>
863
926
 
864
927
  <span class='kw'>def</span> <span class='id identifier rubyid_assign_attributes'>assign_attributes</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
865
928
  <span class='ivar'>@global_assign_attributes_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -872,7 +935,7 @@
872
935
  <div class="method_details ">
873
936
  <h3 class="signature " id="data_class-instance_method">
874
937
 
875
- #<strong>data_class</strong>(new_data_class = nil) &#x21d2; <tt>Object</tt>
938
+ #<strong>data_class</strong>(new_data_class = nil) &#x21d2; <tt>Class</tt>
876
939
 
877
940
 
878
941
 
@@ -881,13 +944,53 @@
881
944
  </h3><div class="docstring">
882
945
  <div class="discussion">
883
946
 
884
- <p>DSL method Sets or calculates the model class based on the component’s family name</p>
947
+ <p>DSL method Sets or calculates the model class. Defaults to the component’s family name, singularized and constantized.</p>
885
948
 
886
949
 
887
950
  </div>
888
951
  </div>
889
952
  <div class="tags">
953
+ <p class="tag_title">Parameters:</p>
954
+ <ul class="param">
955
+
956
+ <li>
957
+
958
+ <span class='name'>new_data_class</span>
959
+
960
+
961
+ <span class='type'>(<tt>Class</tt>, <tt>nil</tt>)</span>
962
+
963
+
964
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
965
+
966
+
967
+ &mdash;
968
+ <div class='inline'>
969
+ <p>If given, the model class to use (e.g. a <span class='object_link'><a href="../VirtualModel.html" title="Compony::VirtualModel (class)">VirtualModel</a></span> subclass).</p>
970
+ </div>
971
+
972
+ </li>
973
+
974
+ </ul>
975
+
976
+ <p class="tag_title">Returns:</p>
977
+ <ul class="return">
978
+
979
+ <li>
980
+
981
+
982
+ <span class='type'>(<tt>Class</tt>)</span>
983
+
984
+
985
+
986
+ &mdash;
987
+ <div class='inline'>
988
+ <p>The resolved data class.</p>
989
+ </div>
990
+
991
+ </li>
890
992
 
993
+ </ul>
891
994
 
892
995
  </div><table class="source_code">
893
996
  <tr>
@@ -895,12 +998,12 @@
895
998
  <pre class="lines">
896
999
 
897
1000
 
898
- 30
899
- 31
900
- 32</pre>
1001
+ 35
1002
+ 36
1003
+ 37</pre>
901
1004
  </td>
902
1005
  <td>
903
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 30</span>
1006
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 35</span>
904
1007
 
905
1008
  <span class='kw'>def</span> <span class='id identifier rubyid_data_class'>data_class</span><span class='lparen'>(</span><span class='id identifier rubyid_new_data_class'>new_data_class</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
906
1009
  <span class='ivar'>@data_class</span> <span class='op'>||=</span> <span class='id identifier rubyid_new_data_class'>new_data_class</span> <span class='op'>||</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='period'>.</span><span class='id identifier rubyid_singularize'>singularize</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='period'>.</span><span class='id identifier rubyid_constantize'>constantize</span>
@@ -964,7 +1067,7 @@
964
1067
  <div class="method_details ">
965
1068
  <h3 class="signature " id="load_data-instance_method">
966
1069
 
967
- #<strong>load_data</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1070
+ #<strong>load_data</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
968
1071
 
969
1072
 
970
1073
 
@@ -972,14 +1075,32 @@
972
1075
 
973
1076
  </h3><div class="docstring">
974
1077
  <div class="discussion">
975
-
976
- <p>DSL method Sets a default load_data block for all standalone paths and verbs. Can be overwritten for a specific path and verb in the <span class='object_link'><a href="Default/Standalone/VerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">Default::Standalone::VerbDsl</a></span>. The block is expected to assign <code>@data</code>.</p>
1078
+ <p class="note returns_void">This method returns an undefined value.</p>
1079
+ <p>DSL method Sets the default <code>load_data</code> block for all standalone paths and verbs (overridable per verb in the VerbDsl). Runs before authorization. The block is expected to assign <code>@data</code>.</p>
977
1080
 
978
1081
 
979
1082
  </div>
980
1083
  </div>
981
1084
  <div class="tags">
982
1085
 
1086
+ <p class="tag_title">Yields:</p>
1087
+ <ul class="yield">
1088
+
1089
+ <li>
1090
+
1091
+
1092
+ <span class='type'></span>
1093
+
1094
+
1095
+
1096
+
1097
+ <div class='inline'>
1098
+ <p>Runs in the component’s request context; must assign <code>@data</code>.</p>
1099
+ </div>
1100
+
1101
+ </li>
1102
+
1103
+ </ul>
983
1104
 
984
1105
  <p class="tag_title">See Also:</p>
985
1106
  <ul class="see">
@@ -994,12 +1115,12 @@
994
1115
  <pre class="lines">
995
1116
 
996
1117
 
997
- 46
998
- 47
999
- 48</pre>
1118
+ 52
1119
+ 53
1120
+ 54</pre>
1000
1121
  </td>
1001
1122
  <td>
1002
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 46</span>
1123
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 52</span>
1003
1124
 
1004
1125
  <span class='kw'>def</span> <span class='id identifier rubyid_load_data'>load_data</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1005
1126
  <span class='ivar'>@global_load_data_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -1046,12 +1167,12 @@
1046
1167
  <pre class="lines">
1047
1168
 
1048
1169
 
1049
- 34
1050
- 35
1051
- 36</pre>
1170
+ 39
1171
+ 40
1172
+ 41</pre>
1052
1173
  </td>
1053
1174
  <td>
1054
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 34</span>
1175
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 39</span>
1055
1176
 
1056
1177
  <span class='kw'>def</span> <span class='id identifier rubyid_resourceful?'>resourceful?</span>
1057
1178
  <span class='kw'>return</span> <span class='kw'>true</span>
@@ -1064,7 +1185,7 @@
1064
1185
  <div class="method_details ">
1065
1186
  <h3 class="signature " id="store_data-instance_method">
1066
1187
 
1067
- #<strong>store_data</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1188
+ #<strong>store_data</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1068
1189
 
1069
1190
 
1070
1191
 
@@ -1072,14 +1193,32 @@
1072
1193
 
1073
1194
  </h3><div class="docstring">
1074
1195
  <div class="discussion">
1075
-
1076
- <p>DSL method Sets a default store_data block for all standalone paths and verbs. Can be overwritten for a specific path and verb in the <span class='object_link'><a href="Default/Standalone/VerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">Default::Standalone::VerbDsl</a></span>. The block is expected save <code>@data</code> to the database.</p>
1196
+ <p class="note returns_void">This method returns an undefined value.</p>
1197
+ <p>DSL method Sets the default <code>store_data</code> block for all standalone paths and verbs (overridable per verb in the VerbDsl). The block is expected to persist <code>@data</code> (override e.g. for virtual models or custom persistence).</p>
1077
1198
 
1078
1199
 
1079
1200
  </div>
1080
1201
  </div>
1081
1202
  <div class="tags">
1082
1203
 
1204
+ <p class="tag_title">Yields:</p>
1205
+ <ul class="yield">
1206
+
1207
+ <li>
1208
+
1209
+
1210
+ <span class='type'></span>
1211
+
1212
+
1213
+
1214
+
1215
+ <div class='inline'>
1216
+ <p>Runs in the component’s request context; persists <code>@data</code>.</p>
1217
+ </div>
1218
+
1219
+ </li>
1220
+
1221
+ </ul>
1083
1222
 
1084
1223
  <p class="tag_title">See Also:</p>
1085
1224
  <ul class="see">
@@ -1094,12 +1233,12 @@
1094
1233
  <pre class="lines">
1095
1234
 
1096
1235
 
1097
- 80
1098
- 81
1099
- 82</pre>
1236
+ 94
1237
+ 95
1238
+ 96</pre>
1100
1239
  </td>
1101
1240
  <td>
1102
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 80</span>
1241
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 94</span>
1103
1242
 
1104
1243
  <span class='kw'>def</span> <span class='id identifier rubyid_store_data'>store_data</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1105
1244
  <span class='ivar'>@global_store_data_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -1114,7 +1253,7 @@
1114
1253
  </div>
1115
1254
 
1116
1255
  <div id="footer">
1117
- Generated on Fri May 15 10:29:33 2026 by
1256
+ Generated on Mon May 18 13:55:35 2026 by
1118
1257
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1119
1258
  0.9.34 (ruby-3.3.5).
1120
1259
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Fri May 15 10:29:33 2026 by
119
+ Generated on Mon May 18 13:55:35 2026 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.3.5).
122
122
  </div>
@@ -272,7 +272,7 @@
272
272
  </div>
273
273
 
274
274
  <div id="footer">
275
- Generated on Fri May 15 10:29:34 2026 by
275
+ Generated on Mon May 18 13:55:36 2026 by
276
276
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
277
277
  0.9.34 (ruby-3.3.5).
278
278
  </div>
@@ -242,7 +242,7 @@
242
242
  </div>
243
243
 
244
244
  <div id="footer">
245
- Generated on Fri May 15 10:29:34 2026 by
245
+ Generated on Mon May 18 13:55:36 2026 by
246
246
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
247
247
  0.9.34 (ruby-3.3.5).
248
248
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Fri May 15 10:29:33 2026 by
119
+ Generated on Mon May 18 13:55:35 2026 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.3.5).
122
122
  </div>