compony 0.6.4 → 0.7.0

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 +12 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +6 -0
  5. data/VERSION +1 -1
  6. data/compony.gemspec +3 -3
  7. data/doc/ComponentGenerator.html +1 -1
  8. data/doc/Components.html +1 -1
  9. data/doc/ComponentsGenerator.html +1 -1
  10. data/doc/Compony/Component.html +247 -156
  11. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  12. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  13. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  16. data/doc/Compony/ComponentMixins/Default.html +1 -1
  17. data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
  18. data/doc/Compony/ComponentMixins.html +1 -1
  19. data/doc/Compony/Components/Button.html +2 -2
  20. data/doc/Compony/Components/Destroy.html +2 -2
  21. data/doc/Compony/Components/Edit.html +2 -2
  22. data/doc/Compony/Components/Form.html +2 -2
  23. data/doc/Compony/Components/Index.html +2 -2
  24. data/doc/Compony/Components/List.html +2 -2
  25. data/doc/Compony/Components/New.html +2 -2
  26. data/doc/Compony/Components/Show.html +2 -2
  27. data/doc/Compony/Components/WithForm.html +19 -21
  28. data/doc/Compony/Components.html +1 -1
  29. data/doc/Compony/ControllerMixin.html +1 -1
  30. data/doc/Compony/Engine.html +1 -1
  31. data/doc/Compony/MethodAccessibleHash.html +1 -1
  32. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  33. data/doc/Compony/ModelFields/Association.html +1 -1
  34. data/doc/Compony/ModelFields/Attachment.html +1 -1
  35. data/doc/Compony/ModelFields/Base.html +1 -1
  36. data/doc/Compony/ModelFields/Boolean.html +1 -1
  37. data/doc/Compony/ModelFields/Color.html +1 -1
  38. data/doc/Compony/ModelFields/Currency.html +1 -1
  39. data/doc/Compony/ModelFields/Date.html +1 -1
  40. data/doc/Compony/ModelFields/Datetime.html +1 -1
  41. data/doc/Compony/ModelFields/Decimal.html +1 -1
  42. data/doc/Compony/ModelFields/Email.html +1 -1
  43. data/doc/Compony/ModelFields/Float.html +1 -1
  44. data/doc/Compony/ModelFields/Integer.html +1 -1
  45. data/doc/Compony/ModelFields/Percentage.html +1 -1
  46. data/doc/Compony/ModelFields/Phone.html +1 -1
  47. data/doc/Compony/ModelFields/RichText.html +1 -1
  48. data/doc/Compony/ModelFields/String.html +1 -1
  49. data/doc/Compony/ModelFields/Text.html +1 -1
  50. data/doc/Compony/ModelFields/Time.html +1 -1
  51. data/doc/Compony/ModelFields/Url.html +1 -1
  52. data/doc/Compony/ModelFields.html +1 -1
  53. data/doc/Compony/ModelMixin.html +1 -1
  54. data/doc/Compony/NaturalOrdering.html +1 -1
  55. data/doc/Compony/RequestContext.html +1 -1
  56. data/doc/Compony/Version.html +1 -1
  57. data/doc/Compony/ViewHelpers.html +1 -1
  58. data/doc/Compony.html +44 -42
  59. data/doc/ComponyController.html +1 -1
  60. data/doc/_index.html +1 -1
  61. data/doc/file.README.html +7 -1
  62. data/doc/index.html +7 -1
  63. data/doc/method_list.html +109 -101
  64. data/doc/top-level-namespace.html +1 -1
  65. data/lib/compony/component.rb +30 -8
  66. data/lib/compony/components/with_form.rb +1 -2
  67. data/lib/compony.rb +9 -8
  68. metadata +2 -2
@@ -443,15 +443,13 @@
443
443
  <li class="public ">
444
444
  <span class="summary_signature">
445
445
 
446
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent_comp = nil, index: 0, **comp_opts) &#x21d2; Component </a>
446
+ <a href="#id_path-instance_method" title="#id_path (instance method)">#<strong>id_path</strong> &#x21d2; Object </a>
447
447
 
448
448
 
449
449
 
450
450
  </span>
451
451
 
452
452
 
453
- <span class="note title constructor">constructor</span>
454
-
455
453
 
456
454
 
457
455
 
@@ -460,7 +458,7 @@
460
458
 
461
459
 
462
460
  <span class="summary_desc"><div class='inline'>
463
- <p>A new instance of Component.</p>
461
+ <p>Returns the id_path from the root_comp.</p>
464
462
  </div></span>
465
463
 
466
464
  </li>
@@ -469,7 +467,7 @@
469
467
  <li class="public ">
470
468
  <span class="summary_signature">
471
469
 
472
- <a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> &#x21d2; Object </a>
470
+ <a href="#id_path_hash-instance_method" title="#id_path_hash (instance method)">#<strong>id_path_hash</strong> &#x21d2; Object </a>
473
471
 
474
472
 
475
473
 
@@ -483,7 +481,9 @@
483
481
 
484
482
 
485
483
 
486
- <span class="summary_desc"><div class='inline'></div></span>
484
+ <span class="summary_desc"><div class='inline'>
485
+ <p>Returns a hash for the id_path.</p>
486
+ </div></span>
487
487
 
488
488
  </li>
489
489
 
@@ -491,13 +491,15 @@
491
491
  <li class="public ">
492
492
  <span class="summary_signature">
493
493
 
494
- <a href="#param_name-instance_method" title="#param_name (instance method)">#<strong>param_name</strong>(unprefixed_param_name) &#x21d2; Object </a>
494
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(parent_comp = nil, index: 0, **comp_opts) &#x21d2; Component </a>
495
495
 
496
496
 
497
497
 
498
498
  </span>
499
499
 
500
500
 
501
+ <span class="note title constructor">constructor</span>
502
+
501
503
 
502
504
 
503
505
 
@@ -506,7 +508,7 @@
506
508
 
507
509
 
508
510
  <span class="summary_desc"><div class='inline'>
509
- <p>Given an unprefixed name of a param, adds the path hash Do not overwrite.</p>
511
+ <p>A new instance of Component.</p>
510
512
  </div></span>
511
513
 
512
514
  </li>
@@ -515,7 +517,29 @@
515
517
  <li class="public ">
516
518
  <span class="summary_signature">
517
519
 
518
- <a href="#path-instance_method" title="#path (instance method)">#<strong>path</strong> &#x21d2; Object </a>
520
+ <a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> &#x21d2; Object </a>
521
+
522
+
523
+
524
+ </span>
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+ <span class="summary_desc"><div class='inline'></div></span>
535
+
536
+ </li>
537
+
538
+
539
+ <li class="public ">
540
+ <span class="summary_signature">
541
+
542
+ <a href="#param_name-instance_method" title="#param_name (instance method)">#<strong>param_name</strong>(unprefixed_param_name) &#x21d2; Object </a>
519
543
 
520
544
 
521
545
 
@@ -530,7 +554,7 @@
530
554
 
531
555
 
532
556
  <span class="summary_desc"><div class='inline'>
533
- <p>Returns the id path from the root_comp.</p>
557
+ <p>Given an unprefixed name of a param, adds the id_path hash Do not overwrite.</p>
534
558
  </div></span>
535
559
 
536
560
  </li>
@@ -539,7 +563,7 @@
539
563
  <li class="public ">
540
564
  <span class="summary_signature">
541
565
 
542
- <a href="#path_hash-instance_method" title="#path_hash (instance method)">#<strong>path_hash</strong> &#x21d2; Object </a>
566
+ <a href="#path-instance_method" title="#path (instance method)">#<strong>path</strong>(&amp;block) &#x21d2; Object </a>
543
567
 
544
568
 
545
569
 
@@ -554,7 +578,7 @@
554
578
 
555
579
 
556
580
  <span class="summary_desc"><div class='inline'>
557
- <p>Returns a hash for the path.</p>
581
+ <p>DSL method Overrides how the path to this component should be generated.</p>
558
582
  </div></span>
559
583
 
560
584
  </li>
@@ -826,7 +850,15 @@
826
850
  58
827
851
  59
828
852
  60
829
- 61</pre>
853
+ 61
854
+ 62
855
+ 63
856
+ 64
857
+ 65
858
+ 66
859
+ 67
860
+ 68
861
+ 69</pre>
830
862
  </td>
831
863
  <td>
832
864
  <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 43</span>
@@ -840,6 +872,14 @@
840
872
  <span class='ivar'>@content_blocks</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
841
873
  <span class='ivar'>@actions</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
842
874
  <span class='ivar'>@skipped_actions</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
875
+ <span class='ivar'>@path_block</span> <span class='op'>=</span> <span class='id identifier rubyid_proc'>proc</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_model'>model</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args_for_path_helper'>args_for_path_helper</span><span class='comma'>,</span> <span class='label'>standalone_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs_for_path_helper'>kwargs_for_path_helper</span><span class='op'>|</span>
876
+ <span class='id identifier rubyid_kwargs_for_path_helper'>kwargs_for_path_helper</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='label'>id:</span> <span class='id identifier rubyid_model'>model</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_model'>model</span>
877
+ <span class='kw'>next</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_routes'>routes</span><span class='period'>.</span><span class='id identifier rubyid_url_helpers'>url_helpers</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span>
878
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_path_helper_name'><span class='object_link'><a href="../Compony.html#path_helper_name-class_method" title="Compony.path_helper_name (method)">path_helper_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_cst'>comp_cst</span><span class='comma'>,</span> <span class='id identifier rubyid_family_cst'>family_cst</span><span class='comma'>,</span> <span class='id identifier rubyid_standalone_name'>standalone_name</span><span class='op'>&amp;.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>_path</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
879
+ <span class='op'>*</span><span class='id identifier rubyid_args_for_path_helper'>args_for_path_helper</span><span class='comma'>,</span>
880
+ <span class='op'>**</span><span class='id identifier rubyid_kwargs_for_path_helper'>kwargs_for_path_helper</span>
881
+ <span class='rparen'>)</span>
882
+ <span class='kw'>end</span>
843
883
 
844
884
  <span class='id identifier rubyid_init_standalone'>init_standalone</span>
845
885
  <span class='id identifier rubyid_init_labelling'>init_labelling</span>
@@ -1235,12 +1275,12 @@
1235
1275
  <pre class="lines">
1236
1276
 
1237
1277
 
1238
- 210
1239
- 211
1240
- 212</pre>
1278
+ 232
1279
+ 233
1280
+ 234</pre>
1241
1281
  </td>
1242
1282
  <td>
1243
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 210</span>
1283
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 232</span>
1244
1284
 
1245
1285
  <span class='kw'>def</span> <span class='id identifier rubyid_action'>action</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1246
1286
  <span class='ivar'>@actions</span><span class='period'>.</span><span class='id identifier rubyid_natural_push'>natural_push</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='comma'>,</span> <span class='label'>before:</span><span class='rparen'>)</span>
@@ -1332,13 +1372,13 @@
1332
1372
  <pre class="lines">
1333
1373
 
1334
1374
 
1335
- 133
1336
- 134
1337
- 135
1338
- 136</pre>
1375
+ 155
1376
+ 156
1377
+ 157
1378
+ 158</pre>
1339
1379
  </td>
1340
1380
  <td>
1341
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 133</span>
1381
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 155</span>
1342
1382
 
1343
1383
  <span class='kw'>def</span> <span class='id identifier rubyid_before_render'>before_render</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='symbol'>:main</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='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1344
1384
  <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'>`before_render` expects a block 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> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
@@ -1447,16 +1487,16 @@
1447
1487
  <pre class="lines">
1448
1488
 
1449
1489
 
1450
- 144
1451
- 145
1452
- 146
1453
- 147
1454
- 148
1455
- 149
1456
- 150</pre>
1490
+ 166
1491
+ 167
1492
+ 168
1493
+ 169
1494
+ 170
1495
+ 171
1496
+ 172</pre>
1457
1497
  </td>
1458
1498
  <td>
1459
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 144</span>
1499
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 166</span>
1460
1500
 
1461
1501
  <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='op'>=</span> <span class='symbol'>:main</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='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1462
1502
  <span class='comment'># A block is required here, but if this is an override (e.g. to hide another content block), we can tolerate the missing block.
@@ -1496,12 +1536,12 @@
1496
1536
  <pre class="lines">
1497
1537
 
1498
1538
 
1499
- 82
1500
- 83
1501
- 84</pre>
1539
+ 90
1540
+ 91
1541
+ 92</pre>
1502
1542
  </td>
1503
1543
  <td>
1504
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 82</span>
1544
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 90</span>
1505
1545
 
1506
1546
  <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
1507
1547
  <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_family_name'>family_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='ivar'>@index</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
@@ -1512,9 +1552,9 @@
1512
1552
  </div>
1513
1553
 
1514
1554
  <div class="method_details ">
1515
- <h3 class="signature " id="inspect-instance_method">
1555
+ <h3 class="signature " id="id_path-instance_method">
1516
1556
 
1517
- #<strong>inspect</strong> &#x21d2; <tt>Object</tt>
1557
+ #<strong>id_path</strong> &#x21d2; <tt>Object</tt>
1518
1558
 
1519
1559
 
1520
1560
 
@@ -1523,6 +1563,8 @@
1523
1563
  </h3><div class="docstring">
1524
1564
  <div class="discussion">
1525
1565
 
1566
+ <p>Returns the id_path from the root_comp. Do not overwrite.</p>
1567
+
1526
1568
 
1527
1569
  </div>
1528
1570
  </div>
@@ -1535,15 +1577,23 @@
1535
1577
  <pre class="lines">
1536
1578
 
1537
1579
 
1538
- 63
1539
- 64
1540
- 65</pre>
1580
+ 96
1581
+ 97
1582
+ 98
1583
+ 99
1584
+ 100
1585
+ 101
1586
+ 102</pre>
1541
1587
  </td>
1542
1588
  <td>
1543
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 63</span>
1589
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 96</span>
1544
1590
 
1545
- <span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
1546
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#&lt;</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hash'>hash</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt;</span><span class='tstring_end'>&quot;</span></span>
1591
+ <span class='kw'>def</span> <span class='id identifier rubyid_id_path'>id_path</span>
1592
+ <span class='kw'>if</span> <span class='id identifier rubyid_root_comp?'>root_comp?</span>
1593
+ <span class='id identifier rubyid_id'>id</span>
1594
+ <span class='kw'>else</span>
1595
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_parent_comp'>parent_comp</span><span class='period'>.</span><span class='id identifier rubyid_id_path'>id_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1596
+ <span class='kw'>end</span>
1547
1597
  <span class='kw'>end</span></pre>
1548
1598
  </td>
1549
1599
  </tr>
@@ -1551,9 +1601,9 @@
1551
1601
  </div>
1552
1602
 
1553
1603
  <div class="method_details ">
1554
- <h3 class="signature " id="param_name-instance_method">
1604
+ <h3 class="signature " id="id_path_hash-instance_method">
1555
1605
 
1556
- #<strong>param_name</strong>(unprefixed_param_name) &#x21d2; <tt>Object</tt>
1606
+ #<strong>id_path_hash</strong> &#x21d2; <tt>Object</tt>
1557
1607
 
1558
1608
 
1559
1609
 
@@ -1562,7 +1612,7 @@
1562
1612
  </h3><div class="docstring">
1563
1613
  <div class="discussion">
1564
1614
 
1565
- <p>Given an unprefixed name of a param, adds the path hash Do not overwrite.</p>
1615
+ <p>Returns a hash for the id_path. Used for params prefixing. Do not overwrite.</p>
1566
1616
 
1567
1617
 
1568
1618
  </div>
@@ -1576,15 +1626,15 @@
1576
1626
  <pre class="lines">
1577
1627
 
1578
1628
 
1579
- 104
1580
- 105
1581
- 106</pre>
1629
+ 106
1630
+ 107
1631
+ 108</pre>
1582
1632
  </td>
1583
1633
  <td>
1584
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 104</span>
1634
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 106</span>
1585
1635
 
1586
- <span class='kw'>def</span> <span class='id identifier rubyid_param_name'>param_name</span><span class='lparen'>(</span><span class='id identifier rubyid_unprefixed_param_name'>unprefixed_param_name</span><span class='rparen'>)</span>
1587
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path_hash'>path_hash</span><span class='embexpr_end'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_unprefixed_param_name'>unprefixed_param_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1636
+ <span class='kw'>def</span> <span class='id identifier rubyid_id_path_hash'>id_path_hash</span>
1637
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span><span class='lparen'>(</span><span class='id identifier rubyid_id_path'>id_path</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='op'>..</span><span class='int'>4</span><span class='rbracket'>]</span>
1588
1638
  <span class='kw'>end</span></pre>
1589
1639
  </td>
1590
1640
  </tr>
@@ -1592,9 +1642,9 @@
1592
1642
  </div>
1593
1643
 
1594
1644
  <div class="method_details ">
1595
- <h3 class="signature " id="path-instance_method">
1645
+ <h3 class="signature " id="inspect-instance_method">
1596
1646
 
1597
- #<strong>path</strong> &#x21d2; <tt>Object</tt>
1647
+ #<strong>inspect</strong> &#x21d2; <tt>Object</tt>
1598
1648
 
1599
1649
 
1600
1650
 
@@ -1603,7 +1653,46 @@
1603
1653
  </h3><div class="docstring">
1604
1654
  <div class="discussion">
1605
1655
 
1606
- <p>Returns the id path from the root_comp. Do not overwrite.</p>
1656
+
1657
+ </div>
1658
+ </div>
1659
+ <div class="tags">
1660
+
1661
+
1662
+ </div><table class="source_code">
1663
+ <tr>
1664
+ <td>
1665
+ <pre class="lines">
1666
+
1667
+
1668
+ 71
1669
+ 72
1670
+ 73</pre>
1671
+ </td>
1672
+ <td>
1673
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 71</span>
1674
+
1675
+ <span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
1676
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#&lt;</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hash'>hash</span><span class='embexpr_end'>}</span><span class='tstring_content'>&gt;</span><span class='tstring_end'>&quot;</span></span>
1677
+ <span class='kw'>end</span></pre>
1678
+ </td>
1679
+ </tr>
1680
+ </table>
1681
+ </div>
1682
+
1683
+ <div class="method_details ">
1684
+ <h3 class="signature " id="param_name-instance_method">
1685
+
1686
+ #<strong>param_name</strong>(unprefixed_param_name) &#x21d2; <tt>Object</tt>
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+ </h3><div class="docstring">
1693
+ <div class="discussion">
1694
+
1695
+ <p>Given an unprefixed name of a param, adds the id_path hash Do not overwrite.</p>
1607
1696
 
1608
1697
 
1609
1698
  </div>
@@ -1617,23 +1706,15 @@
1617
1706
  <pre class="lines">
1618
1707
 
1619
1708
 
1620
- 88
1621
- 89
1622
- 90
1623
- 91
1624
- 92
1625
- 93
1626
- 94</pre>
1709
+ 112
1710
+ 113
1711
+ 114</pre>
1627
1712
  </td>
1628
1713
  <td>
1629
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 88</span>
1714
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 112</span>
1630
1715
 
1631
- <span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
1632
- <span class='kw'>if</span> <span class='id identifier rubyid_root_comp?'>root_comp?</span>
1633
- <span class='id identifier rubyid_id'>id</span>
1634
- <span class='kw'>else</span>
1635
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_parent_comp'>parent_comp</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1636
- <span class='kw'>end</span>
1716
+ <span class='kw'>def</span> <span class='id identifier rubyid_param_name'>param_name</span><span class='lparen'>(</span><span class='id identifier rubyid_unprefixed_param_name'>unprefixed_param_name</span><span class='rparen'>)</span>
1717
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id_path_hash'>id_path_hash</span><span class='embexpr_end'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_unprefixed_param_name'>unprefixed_param_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1637
1718
  <span class='kw'>end</span></pre>
1638
1719
  </td>
1639
1720
  </tr>
@@ -1641,9 +1722,9 @@
1641
1722
  </div>
1642
1723
 
1643
1724
  <div class="method_details ">
1644
- <h3 class="signature " id="path_hash-instance_method">
1725
+ <h3 class="signature " id="path-instance_method">
1645
1726
 
1646
- #<strong>path_hash</strong> &#x21d2; <tt>Object</tt>
1727
+ #<strong>path</strong>(&amp;block) &#x21d2; <tt>Object</tt>
1647
1728
 
1648
1729
 
1649
1730
 
@@ -1652,7 +1733,7 @@
1652
1733
  </h3><div class="docstring">
1653
1734
  <div class="discussion">
1654
1735
 
1655
- <p>Returns a hash for the path. Used for params prefixing. Do not overwrite.</p>
1736
+ <p>DSL method Overrides how the path to this component should be generated. The block will be given the following args: a model (optional), pos. args for the path helper, the kwarg <code>standalone_name</code> and kwargs for the path helper. The block is expected to return a Rails path. It is not given <code>controller</code> or <code>helpers</code>, instead use: <code>Rails.application.routes.url_helpers</code>. For an example, refer to the initializer of this class, where the default block is defined.</p>
1656
1737
 
1657
1738
 
1658
1739
  </div>
@@ -1666,15 +1747,25 @@
1666
1747
  <pre class="lines">
1667
1748
 
1668
1749
 
1669
- 98
1670
- 99
1671
- 100</pre>
1750
+ 140
1751
+ 141
1752
+ 142
1753
+ 143
1754
+ 144
1755
+ 145
1756
+ 146
1757
+ 147</pre>
1672
1758
  </td>
1673
1759
  <td>
1674
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 98</span>
1760
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 140</span>
1675
1761
 
1676
- <span class='kw'>def</span> <span class='id identifier rubyid_path_hash'>path_hash</span>
1677
- <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='op'>..</span><span class='int'>4</span><span class='rbracket'>]</span>
1762
+ <span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1763
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1764
+ <span class='comment'># Assignment via DSL
1765
+ </span> <span class='ivar'>@path_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
1766
+ <span class='kw'>else</span>
1767
+ <span class='ivar'>@path_block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
1768
+ <span class='kw'>end</span>
1678
1769
  <span class='kw'>end</span></pre>
1679
1770
  </td>
1680
1771
  </tr>
@@ -1727,18 +1818,18 @@
1727
1818
  <pre class="lines">
1728
1819
 
1729
1820
 
1730
- 155
1731
- 156
1732
- 157
1733
- 158
1734
- 159
1735
- 160
1736
- 161
1737
- 162
1738
- 163</pre>
1821
+ 177
1822
+ 178
1823
+ 179
1824
+ 180
1825
+ 181
1826
+ 182
1827
+ 183
1828
+ 184
1829
+ 185</pre>
1739
1830
  </td>
1740
1831
  <td>
1741
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 155</span>
1832
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 177</span>
1742
1833
 
1743
1834
  <span class='kw'>def</span> <span class='id identifier rubyid_remove_content'>remove_content</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/PredicateMethod
1744
1835
  </span> <span class='id identifier rubyid_existing_index'>existing_index</span> <span class='op'>=</span> <span class='ivar'>@content_blocks</span><span class='period'>.</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='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span>
@@ -1800,12 +1891,12 @@
1800
1891
  <pre class="lines">
1801
1892
 
1802
1893
 
1803
- 168
1804
- 169
1805
- 170</pre>
1894
+ 190
1895
+ 191
1896
+ 192</pre>
1806
1897
  </td>
1807
1898
  <td>
1808
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 168</span>
1899
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 190</span>
1809
1900
 
1810
1901
  <span class='kw'>def</span> <span class='id identifier rubyid_remove_content!'>remove_content!</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
1811
1902
  <span class='id identifier rubyid_remove_content'>remove_content</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</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 for removal 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>
@@ -1863,28 +1954,6 @@
1863
1954
  <pre class="lines">
1864
1955
 
1865
1956
 
1866
- 175
1867
- 176
1868
- 177
1869
- 178
1870
- 179
1871
- 180
1872
- 181
1873
- 182
1874
- 183
1875
- 184
1876
- 185
1877
- 186
1878
- 187
1879
- 188
1880
- 189
1881
- 190
1882
- 191
1883
- 192
1884
- 193
1885
- 194
1886
- 195
1887
- 196
1888
1957
  197
1889
1958
  198
1890
1959
  199
@@ -1893,10 +1962,32 @@
1893
1962
  202
1894
1963
  203
1895
1964
  204
1896
- 205</pre>
1965
+ 205
1966
+ 206
1967
+ 207
1968
+ 208
1969
+ 209
1970
+ 210
1971
+ 211
1972
+ 212
1973
+ 213
1974
+ 214
1975
+ 215
1976
+ 216
1977
+ 217
1978
+ 218
1979
+ 219
1980
+ 220
1981
+ 221
1982
+ 222
1983
+ 223
1984
+ 224
1985
+ 225
1986
+ 226
1987
+ 227</pre>
1897
1988
  </td>
1898
1989
  <td>
1899
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 175</span>
1990
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 197</span>
1900
1991
 
1901
1992
  <span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='comma'>,</span> <span class='label'>standalone:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_locals'>locals</span><span class='rparen'>)</span>
1902
1993
  <span class='comment'># Call before_render hooks (if any) and backfire instance variables back to the component
@@ -1960,25 +2051,25 @@
1960
2051
  <pre class="lines">
1961
2052
 
1962
2053
 
1963
- 221
1964
- 222
1965
- 223
1966
- 224
1967
- 225
1968
- 226
1969
- 227
1970
- 228
1971
- 229
1972
- 230
1973
- 231
1974
- 232
1975
- 233
1976
- 234
1977
- 235
1978
- 236</pre>
2054
+ 243
2055
+ 244
2056
+ 245
2057
+ 246
2058
+ 247
2059
+ 248
2060
+ 249
2061
+ 250
2062
+ 251
2063
+ 252
2064
+ 253
2065
+ 254
2066
+ 255
2067
+ 256
2068
+ 257
2069
+ 258</pre>
1979
2070
  </td>
1980
2071
  <td>
1981
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 221</span>
2072
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 243</span>
1982
2073
 
1983
2074
  <span class='kw'>def</span> <span class='id identifier rubyid_render_actions'>render_actions</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='comma'>,</span> <span class='label'>wrapper_class:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>action_class:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1984
2075
  <span class='id identifier rubyid_h'>h</span> <span class='op'>=</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_helpers'>helpers</span>
@@ -2040,12 +2131,12 @@
2040
2131
  <pre class="lines">
2041
2132
 
2042
2133
 
2043
- 239
2044
- 240
2045
- 241</pre>
2134
+ 261
2135
+ 262
2136
+ 263</pre>
2046
2137
  </td>
2047
2138
  <td>
2048
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 239</span>
2139
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 261</span>
2049
2140
 
2050
2141
  <span class='kw'>def</span> <span class='id identifier rubyid_resourceful?'>resourceful?</span>
2051
2142
  <span class='kw'>return</span> <span class='kw'>false</span>
@@ -2081,13 +2172,13 @@
2081
2172
  <pre class="lines">
2082
2173
 
2083
2174
 
2084
- 69
2085
- 70
2086
- 71
2087
- 72</pre>
2175
+ 77
2176
+ 78
2177
+ 79
2178
+ 80</pre>
2088
2179
  </td>
2089
2180
  <td>
2090
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 69</span>
2181
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 77</span>
2091
2182
 
2092
2183
  <span class='kw'>def</span> <span class='id identifier rubyid_root_comp'>root_comp</span>
2093
2184
  <span class='kw'>return</span> <span class='kw'>self</span> <span class='kw'>unless</span> <span class='id identifier rubyid_parent_comp'>parent_comp</span>
@@ -2137,12 +2228,12 @@
2137
2228
  <pre class="lines">
2138
2229
 
2139
2230
 
2140
- 76
2141
- 77
2142
- 78</pre>
2231
+ 84
2232
+ 85
2233
+ 86</pre>
2143
2234
  </td>
2144
2235
  <td>
2145
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 76</span>
2236
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 84</span>
2146
2237
 
2147
2238
  <span class='kw'>def</span> <span class='id identifier rubyid_root_comp?'>root_comp?</span>
2148
2239
  <span class='id identifier rubyid_parent_comp'>parent_comp</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -2178,12 +2269,12 @@
2178
2269
  <pre class="lines">
2179
2270
 
2180
2271
 
2181
- 216
2182
- 217
2183
- 218</pre>
2272
+ 238
2273
+ 239
2274
+ 240</pre>
2184
2275
  </td>
2185
2276
  <td>
2186
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 216</span>
2277
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 238</span>
2187
2278
 
2188
2279
  <span class='kw'>def</span> <span class='id identifier rubyid_skip_action'>skip_action</span><span class='lparen'>(</span><span class='id identifier rubyid_action_name'>action_name</span><span class='rparen'>)</span>
2189
2280
  <span class='ivar'>@skipped_actions</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_action_name'>action_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
@@ -2219,14 +2310,14 @@
2219
2310
  <pre class="lines">
2220
2311
 
2221
2312
 
2222
- 109
2223
- 110
2224
- 111
2225
- 112
2226
- 113</pre>
2313
+ 117
2314
+ 118
2315
+ 119
2316
+ 120
2317
+ 121</pre>
2227
2318
  </td>
2228
2319
  <td>
2229
- <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 109</span>
2320
+ <pre class="code"><span class="info file"># File 'lib/compony/component.rb', line 117</span>
2230
2321
 
2231
2322
  <span class='kw'>def</span> <span class='id identifier rubyid_sub_comp'>sub_comp</span><span class='lparen'>(</span><span class='id identifier rubyid_component_class'>component_class</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_comp_opts'>comp_opts</span><span class='rparen'>)</span>
2232
2323
  <span class='id identifier rubyid_sub'>sub</span> <span class='op'>=</span> <span class='id identifier rubyid_component_class'>component_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>index:</span> <span class='ivar'>@sub_comps</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_comp_opts'>comp_opts</span><span class='rparen'>)</span>
@@ -2243,7 +2334,7 @@
2243
2334
  </div>
2244
2335
 
2245
2336
  <div id="footer">
2246
- Generated on Mon Nov 10 13:15:57 2025 by
2337
+ Generated on Fri Nov 14 15:08:16 2025 by
2247
2338
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2248
2339
  0.9.34 (ruby-3.3.5).
2249
2340
  </div>