compony 0.8.1 → 0.10.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/compony.gemspec +4 -4
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +2 -2
- data/doc/Compony/ComponentMixins/Default/Labelling.html +120 -39
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Buttons/CssButton.html +1 -1
- data/doc/Compony/Components/Buttons/Link.html +1 -1
- data/doc/Compony/Components/Buttons.html +1 -1
- data/doc/Compony/Components/Destroy.html +1 -1
- data/doc/Compony/Components/Edit.html +13 -13
- data/doc/Compony/Components/Form.html +49 -49
- data/doc/Compony/Components/Index.html +1 -1
- data/doc/Compony/Components/List.html +346 -473
- data/doc/Compony/Components/New.html +13 -13
- data/doc/Compony/Components/Show.html +25 -25
- data/doc/Compony/Components/WithForm.html +1 -1
- data/doc/Compony/Components.html +1 -1
- data/doc/Compony/ControllerMixin.html +1 -1
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/ExposedIntentsDsl.html +1 -1
- data/doc/Compony/Intent.html +157 -103
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +2 -2
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +1 -1
- data/doc/Compony/ModelFields/Boolean.html +1 -1
- data/doc/Compony/ModelFields/Color.html +1 -1
- data/doc/Compony/ModelFields/Currency.html +1 -1
- data/doc/Compony/ModelFields/Date.html +1 -1
- data/doc/Compony/ModelFields/Datetime.html +1 -1
- data/doc/Compony/ModelFields/Decimal.html +1 -1
- data/doc/Compony/ModelFields/Email.html +1 -1
- data/doc/Compony/ModelFields/Float.html +1 -1
- data/doc/Compony/ModelFields/Integer.html +1 -1
- data/doc/Compony/ModelFields/Percentage.html +1 -1
- data/doc/Compony/ModelFields/Phone.html +1 -1
- data/doc/Compony/ModelFields/RichText.html +1 -1
- data/doc/Compony/ModelFields/String.html +1 -1
- data/doc/Compony/ModelFields/Text.html +1 -1
- data/doc/Compony/ModelFields/Time.html +1 -1
- data/doc/Compony/ModelFields/Url.html +1 -1
- data/doc/Compony/ModelFields.html +1 -1
- data/doc/Compony/ModelMixin.html +1 -1
- data/doc/Compony/NaturalOrdering.html +1 -1
- data/doc/Compony/RequestContext.html +26 -36
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +1 -1
- data/doc/Compony/VirtualModel.html +1 -1
- data/doc/Compony.html +10 -10
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +8 -8
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +2 -2
- data/doc/guide/intents.md +3 -3
- data/doc/guide/nesting.md +26 -4
- data/doc/index.html +2 -2
- data/doc/method_list.html +174 -182
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/component.rb +1 -1
- data/lib/compony/component_mixins/default/labelling.rb +28 -17
- data/lib/compony/components/destroy.rb +3 -3
- data/lib/compony/components/edit.rb +3 -2
- data/lib/compony/components/form.rb +0 -1
- data/lib/compony/components/index.rb +1 -1
- data/lib/compony/components/list.rb +57 -62
- data/lib/compony/components/new.rb +0 -1
- data/lib/compony/components/show.rb +5 -9
- data/lib/compony/intent.rb +30 -19
- data/lib/compony/{exposed_intents_dsl.rb → manage_intents_dsl.rb} +6 -3
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/model_mixin.rb +1 -1
- data/lib/compony/request_context.rb +12 -6
- data/lib/compony.rb +6 -6
- metadata +3 -3
|
@@ -309,12 +309,12 @@
|
|
|
309
309
|
<pre class="lines">
|
|
310
310
|
|
|
311
311
|
|
|
312
|
+
98
|
|
312
313
|
99
|
|
313
|
-
100
|
|
314
|
-
101</pre>
|
|
314
|
+
100</pre>
|
|
315
315
|
</td>
|
|
316
316
|
<td>
|
|
317
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line
|
|
317
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 98</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'>&</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
|
+
83
|
|
353
354
|
84
|
|
354
|
-
85
|
|
355
|
-
86</pre>
|
|
355
|
+
85</pre>
|
|
356
356
|
</td>
|
|
357
357
|
<td>
|
|
358
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line
|
|
358
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 83</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'>&</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
|
+
93
|
|
394
395
|
94
|
|
395
|
-
95
|
|
396
|
-
96</pre>
|
|
396
|
+
95</pre>
|
|
397
397
|
</td>
|
|
398
398
|
<td>
|
|
399
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line
|
|
399
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 93</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'>&</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
|
+
88
|
|
435
436
|
89
|
|
436
|
-
90
|
|
437
|
-
91</pre>
|
|
437
|
+
90</pre>
|
|
438
438
|
</td>
|
|
439
439
|
<td>
|
|
440
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line
|
|
440
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/new.rb', line 88</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'>&</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
|
|
455
|
+
Generated on Mon Dec 8 15:19:20 2025 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.3.5).
|
|
458
458
|
</div>
|
|
@@ -341,14 +341,14 @@
|
|
|
341
341
|
<pre class="lines">
|
|
342
342
|
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
344
|
+
56
|
|
345
|
+
57
|
|
346
|
+
58
|
|
347
|
+
59
|
|
348
|
+
60</pre>
|
|
349
349
|
</td>
|
|
350
350
|
<td>
|
|
351
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
351
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 56</span>
|
|
352
352
|
|
|
353
353
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='label'>skip_columns:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
354
354
|
<span class='ivar'>@columns</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>
|
|
@@ -413,12 +413,12 @@
|
|
|
413
413
|
<pre class="lines">
|
|
414
414
|
|
|
415
415
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
104
|
|
417
|
+
105
|
|
418
|
+
106</pre>
|
|
419
419
|
</td>
|
|
420
420
|
<td>
|
|
421
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
421
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 104</span>
|
|
422
422
|
|
|
423
423
|
<span class='kw'>def</span> <span class='id identifier rubyid_all_field_columns'>all_field_columns</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
|
424
424
|
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_each_key'>each_key</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_field_name'>field_name</span><span class='op'>|</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_field_name'>field_name</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
@@ -562,6 +562,10 @@
|
|
|
562
562
|
<pre class="lines">
|
|
563
563
|
|
|
564
564
|
|
|
565
|
+
69
|
|
566
|
+
70
|
|
567
|
+
71
|
|
568
|
+
72
|
|
565
569
|
73
|
|
566
570
|
74
|
|
567
571
|
75
|
|
@@ -573,14 +577,10 @@
|
|
|
573
577
|
81
|
|
574
578
|
82
|
|
575
579
|
83
|
|
576
|
-
84
|
|
577
|
-
85
|
|
578
|
-
86
|
|
579
|
-
87
|
|
580
|
-
88</pre>
|
|
580
|
+
84</pre>
|
|
581
581
|
</td>
|
|
582
582
|
<td>
|
|
583
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
583
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 69</span>
|
|
584
584
|
|
|
585
585
|
<span class='kw'>def</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>link_opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>link_to_component:</span> <span class='symbol'>:show</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
586
586
|
<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>
|
|
@@ -649,12 +649,12 @@
|
|
|
649
649
|
<pre class="lines">
|
|
650
650
|
|
|
651
651
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
652
|
+
89
|
|
653
|
+
90
|
|
654
|
+
91</pre>
|
|
655
655
|
</td>
|
|
656
656
|
<td>
|
|
657
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
657
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 89</span>
|
|
658
658
|
|
|
659
659
|
<span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_col_names'>col_names</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
660
660
|
<span class='id identifier rubyid_col_names'>col_names</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col_name'>col_name</span><span class='op'>|</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_col_name'>col_name</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
@@ -710,12 +710,12 @@
|
|
|
710
710
|
<pre class="lines">
|
|
711
711
|
|
|
712
712
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
97
|
|
714
|
+
98
|
|
715
|
+
99</pre>
|
|
716
716
|
</td>
|
|
717
717
|
<td>
|
|
718
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
718
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 97</span>
|
|
719
719
|
|
|
720
720
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_column'>skip_column</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
721
721
|
<span class='ivar'>@skipped_columns</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>
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
</div>
|
|
731
731
|
|
|
732
732
|
<div id="footer">
|
|
733
|
-
Generated on
|
|
733
|
+
Generated on Mon Dec 8 15:19:20 2025 by
|
|
734
734
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
735
735
|
0.9.34 (ruby-3.3.5).
|
|
736
736
|
</div>
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
</div>
|
|
592
592
|
|
|
593
593
|
<div id="footer">
|
|
594
|
-
Generated on
|
|
594
|
+
Generated on Mon Dec 8 15:19:21 2025 by
|
|
595
595
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
596
596
|
0.9.34 (ruby-3.3.5).
|
|
597
597
|
</div>
|
data/doc/Compony/Components.html
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<div id="footer">
|
|
121
|
-
Generated on
|
|
121
|
+
Generated on Mon Dec 8 15:19:20 2025 by
|
|
122
122
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
123
123
|
0.9.34 (ruby-3.3.5).
|
|
124
124
|
</div>
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
</div>
|
|
127
127
|
|
|
128
128
|
<div id="footer">
|
|
129
|
-
Generated on
|
|
129
|
+
Generated on Mon Dec 8 15:19:20 2025 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.3.5).
|
|
132
132
|
</div>
|
data/doc/Compony/Engine.html
CHANGED
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
</div>
|
|
124
124
|
|
|
125
125
|
<div id="footer">
|
|
126
|
-
Generated on
|
|
126
|
+
Generated on Mon Dec 8 15:19:20 2025 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.3.5).
|
|
129
129
|
</div>
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
</div>
|
|
394
394
|
|
|
395
395
|
<div id="footer">
|
|
396
|
-
Generated on Fri Nov 28
|
|
396
|
+
Generated on Fri Nov 28 12:38:50 2025 by
|
|
397
397
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
398
398
|
0.9.34 (ruby-3.3.5).
|
|
399
399
|
</div>
|