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
@@ -113,6 +113,37 @@
113
113
 
114
114
 
115
115
  </div>
116
+
117
+ <h2>
118
+ Constant Summary
119
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <dl class="constants">
123
+
124
+ <dt id="DEFAULT_CONFIG-constant" class="">DEFAULT_CONFIG =
125
+ <div class="docstring">
126
+ <div class="discussion">
127
+
128
+ <p>Defaults injected only on the first <code>standalone</code> call. Kept out of subsequent calls so inherited values survive.</p>
129
+
130
+
131
+ </div>
132
+ </div>
133
+ <div class="tags">
134
+
135
+
136
+ </div>
137
+ </dt>
138
+ <dd><pre class="code"><span class='lbrace'>{</span>
139
+ <span class='label'>skip_authentication:</span> <span class='kw'>false</span><span class='comma'>,</span>
140
+ <span class='label'>skip_forgery_protection:</span> <span class='kw'>false</span><span class='comma'>,</span>
141
+ <span class='label'>layout:</span> <span class='kw'>true</span>
142
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
143
+
144
+ </dl>
145
+
146
+
116
147
 
117
148
 
118
149
 
@@ -156,7 +187,7 @@
156
187
  <li class="protected ">
157
188
  <span class="summary_signature">
158
189
 
159
- <a href="#layout-instance_method" title="#layout (instance method)">#<strong>layout</strong>(layout) &#x21d2; Object </a>
190
+ <a href="#layout-instance_method" title="#layout (instance method)">#<strong>layout</strong>(layout) &#x21d2; void </a>
160
191
 
161
192
 
162
193
 
@@ -171,7 +202,7 @@
171
202
 
172
203
 
173
204
  <span class="summary_desc"><div class='inline'>
174
- <p>DSL Speficies the Rails layout (under <code>app/views/layouts</code>) that should be used to render this component.</p>
205
+ <p>DSL method.</p>
175
206
  </div></span>
176
207
 
177
208
  </li>
@@ -180,7 +211,7 @@
180
211
  <li class="protected ">
181
212
  <span class="summary_signature">
182
213
 
183
- <a href="#skip_authentication!-instance_method" title="#skip_authentication! (instance method)">#<strong>skip_authentication!</strong> &#x21d2; Object </a>
214
+ <a href="#skip_authentication!-instance_method" title="#skip_authentication! (instance method)">#<strong>skip_authentication!</strong> &#x21d2; void </a>
184
215
 
185
216
 
186
217
 
@@ -195,7 +226,7 @@
195
226
 
196
227
 
197
228
  <span class="summary_desc"><div class='inline'>
198
- <p>DSL Defines that for this component, no authentication should be performed.</p>
229
+ <p>DSL method.</p>
199
230
  </div></span>
200
231
 
201
232
  </li>
@@ -204,7 +235,7 @@
204
235
  <li class="protected ">
205
236
  <span class="summary_signature">
206
237
 
207
- <a href="#skip_forgery_protection!-instance_method" title="#skip_forgery_protection! (instance method)">#<strong>skip_forgery_protection!</strong> &#x21d2; Object </a>
238
+ <a href="#skip_forgery_protection!-instance_method" title="#skip_forgery_protection! (instance method)">#<strong>skip_forgery_protection!</strong> &#x21d2; void </a>
208
239
 
209
240
 
210
241
 
@@ -219,7 +250,7 @@
219
250
 
220
251
 
221
252
  <span class="summary_desc"><div class='inline'>
222
- <p>DSL Defines that for this component, no forgery protection (CSRF) should be performed.</p>
253
+ <p>DSL method.</p>
223
254
  </div></span>
224
255
 
225
256
  </li>
@@ -252,7 +283,7 @@
252
283
  <li class="protected ">
253
284
  <span class="summary_signature">
254
285
 
255
- <a href="#verb-instance_method" title="#verb (instance method)">#<strong>verb</strong>(verb, **nargs) &#x21d2; Object </a>
286
+ <a href="#verb-instance_method" title="#verb (instance method)">#<strong>verb</strong>(verb, **nargs) &#x21d2; void </a>
256
287
 
257
288
 
258
289
 
@@ -267,7 +298,7 @@
267
298
 
268
299
 
269
300
  <span class="summary_desc"><div class='inline'>
270
- <p>DSL call for defining a config for a verb.</p>
301
+ <p>DSL method.</p>
271
302
  </div></span>
272
303
 
273
304
  </li>
@@ -319,7 +350,10 @@
319
350
  19
320
351
  20
321
352
  21
322
- 22</pre>
353
+ 22
354
+ 23
355
+ 24
356
+ 25</pre>
323
357
  </td>
324
358
  <td>
325
359
  <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 9</span>
@@ -334,9 +368,12 @@
334
368
  <span class='ivar'>@scope</span> <span class='op'>=</span> <span class='id identifier rubyid_scope'>scope</span>
335
369
  <span class='ivar'>@scope_args</span> <span class='op'>=</span> <span class='id identifier rubyid_scope_args'>scope_args</span>
336
370
  <span class='ivar'>@verbs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
337
- <span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>false</span>
338
- <span class='ivar'>@skip_forgery_protection</span> <span class='op'>=</span> <span class='kw'>false</span>
339
- <span class='ivar'>@layout</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># can be overriden by false or a string
371
+ <span class='comment'># These default to nil so that, on subsequent `standalone` calls (e.g. subclass overrides), they are stripped
372
+ </span> <span class='comment'># by `compact` and thus do NOT clobber values inherited via `deep_merge!`. The actual defaults are only injected
373
+ </span> <span class='comment'># when `provide_defaults` is true (i.e. the first `standalone` call). This mirrors VerbDsl#to_conf.
374
+ </span> <span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>nil</span>
375
+ <span class='ivar'>@skip_forgery_protection</span> <span class='op'>=</span> <span class='kw'>nil</span>
376
+ <span class='ivar'>@layout</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='comment'># can be overriden by false or a string
340
377
  </span><span class='kw'>end</span></pre>
341
378
  </td>
342
379
  </tr>
@@ -353,7 +390,7 @@
353
390
  <div class="method_details first">
354
391
  <h3 class="signature first" id="layout-instance_method">
355
392
 
356
- #<strong>layout</strong>(layout) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
393
+ #<strong>layout</strong>(layout) &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
357
394
 
358
395
 
359
396
 
@@ -361,8 +398,8 @@
361
398
 
362
399
  </h3><div class="docstring">
363
400
  <div class="discussion">
364
-
365
- <p>DSL Speficies the Rails layout (under <code>app/views/layouts</code>) that should be used to render this component. Defaults to Rails’ default (<code>layouts/application</code>) if the method is never called.</p>
401
+ <p class="note returns_void">This method returns an undefined value.</p>
402
+ <p>DSL method. Sets the Rails layout (under <code>app/views/layouts</code>) used to render this component. Defaults to Rails’ default (<code>layouts/application</code>) if never called.</p>
366
403
 
367
404
 
368
405
  </div>
@@ -376,13 +413,13 @@
376
413
  <span class='name'>layout</span>
377
414
 
378
415
 
379
- <span class='type'>(<tt>String</tt>)</span>
416
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
380
417
 
381
418
 
382
419
 
383
420
  &mdash;
384
421
  <div class='inline'>
385
- <p>name of the layout as you would give it to a Rails controller’s <code>render</code> method</p>
422
+ <p>Layout name, as passed to a Rails controller’s <code>render</code>.</p>
386
423
  </div>
387
424
 
388
425
  </li>
@@ -396,12 +433,12 @@
396
433
  <pre class="lines">
397
434
 
398
435
 
399
- 80
400
- 81
401
- 82</pre>
436
+ 97
437
+ 98
438
+ 99</pre>
402
439
  </td>
403
440
  <td>
404
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 80</span>
441
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 97</span>
405
442
 
406
443
  <span class='kw'>def</span> <span class='id identifier rubyid_layout'>layout</span><span class='lparen'>(</span><span class='id identifier rubyid_layout'>layout</span><span class='rparen'>)</span>
407
444
  <span class='ivar'>@layout</span> <span class='op'>=</span> <span class='id identifier rubyid_layout'>layout</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
@@ -414,7 +451,7 @@
414
451
  <div class="method_details ">
415
452
  <h3 class="signature " id="skip_authentication!-instance_method">
416
453
 
417
- #<strong>skip_authentication!</strong> &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
454
+ #<strong>skip_authentication!</strong> &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
418
455
 
419
456
 
420
457
 
@@ -422,8 +459,8 @@
422
459
 
423
460
  </h3><div class="docstring">
424
461
  <div class="discussion">
425
-
426
- <p>DSL Defines that for this component, no authentication should be performed.</p>
462
+ <p class="note returns_void">This method returns an undefined value.</p>
463
+ <p>DSL method. Disables app authentication for this standalone (an <code>authorize</code> block is still mandatory).</p>
427
464
 
428
465
 
429
466
  </div>
@@ -437,12 +474,12 @@
437
474
  <pre class="lines">
438
475
 
439
476
 
440
- 66
441
- 67
442
- 68</pre>
477
+ 81
478
+ 82
479
+ 83</pre>
443
480
  </td>
444
481
  <td>
445
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 66</span>
482
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 81</span>
446
483
 
447
484
  <span class='kw'>def</span> <span class='id identifier rubyid_skip_authentication!'>skip_authentication!</span>
448
485
  <span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -455,7 +492,7 @@
455
492
  <div class="method_details ">
456
493
  <h3 class="signature " id="skip_forgery_protection!-instance_method">
457
494
 
458
- #<strong>skip_forgery_protection!</strong> &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
495
+ #<strong>skip_forgery_protection!</strong> &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
459
496
 
460
497
 
461
498
 
@@ -463,8 +500,8 @@
463
500
 
464
501
  </h3><div class="docstring">
465
502
  <div class="discussion">
466
-
467
- <p>DSL Defines that for this component, no forgery protection (CSRF) should be performed.</p>
503
+ <p class="note returns_void">This method returns an undefined value.</p>
504
+ <p>DSL method. Disables forgery protection (CSRF) for this standalone’s controller action.</p>
468
505
 
469
506
 
470
507
  </div>
@@ -478,12 +515,12 @@
478
515
  <pre class="lines">
479
516
 
480
517
 
481
- 72
482
- 73
483
- 74</pre>
518
+ 88
519
+ 89
520
+ 90</pre>
484
521
  </td>
485
522
  <td>
486
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 72</span>
523
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 88</span>
487
524
 
488
525
  <span class='kw'>def</span> <span class='id identifier rubyid_skip_forgery_protection!'>skip_forgery_protection!</span>
489
526
  <span class='ivar'>@skip_forgery_protection</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -519,31 +556,33 @@
519
556
  <pre class="lines">
520
557
 
521
558
 
522
- 25
523
- 26
524
- 27
525
- 28
526
- 29
527
- 30
528
- 31
529
- 32
530
- 33
531
- 34
532
559
  35
533
560
  36
534
561
  37
535
562
  38
536
563
  39
537
564
  40
538
- 41</pre>
565
+ 41
566
+ 42
567
+ 43
568
+ 44
569
+ 45
570
+ 46
571
+ 47
572
+ 48
573
+ 49
574
+ 50
575
+ 51
576
+ 52</pre>
539
577
  </td>
540
578
  <td>
541
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 25</span>
579
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 35</span>
542
580
 
543
581
  <span class='kw'>def</span> <span class='id identifier rubyid_to_conf'>to_conf</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
544
582
  <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
545
583
  <span class='ivar'>@component</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_binding'>binding</span><span class='period'>.</span><span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>self</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='comment'># Fetches the component holding this DSL call (via the block)
546
- </span> <span class='kw'>return</span> <span class='lbrace'>{</span>
584
+ </span> <span class='id identifier rubyid_base_config'>base_config</span> <span class='op'>=</span> <span class='ivar'>@provide_defaults</span> <span class='op'>?</span> <span class='const'><span class='object_link'><a href="#DEFAULT_CONFIG-constant" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl::DEFAULT_CONFIG (constant)">DEFAULT_CONFIG</a></span></span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
585
+ <span class='kw'>return</span> <span class='id identifier rubyid_base_config'>base_config</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span>
547
586
  <span class='label'>name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
548
587
  <span class='label'>path:</span> <span class='ivar'>@path</span><span class='comma'>,</span>
549
588
  <span class='label'>constraints:</span> <span class='ivar'>@constraints</span><span class='comma'>,</span>
@@ -555,7 +594,7 @@
555
594
  <span class='label'>skip_authentication:</span> <span class='ivar'>@skip_authentication</span><span class='comma'>,</span>
556
595
  <span class='label'>skip_forgery_protection:</span> <span class='ivar'>@skip_forgery_protection</span><span class='comma'>,</span>
557
596
  <span class='label'>layout:</span> <span class='ivar'>@layout</span>
558
- <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span>
597
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='rparen'>)</span>
559
598
  <span class='kw'>end</span></pre>
560
599
  </td>
561
600
  </tr>
@@ -565,7 +604,7 @@
565
604
  <div class="method_details ">
566
605
  <h3 class="signature " id="verb-instance_method">
567
606
 
568
- #<strong>verb</strong>(verb, **nargs) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
607
+ #<strong>verb</strong>(verb, **nargs) &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
569
608
 
570
609
 
571
610
 
@@ -573,8 +612,8 @@
573
612
 
574
613
  </h3><div class="docstring">
575
614
  <div class="discussion">
576
-
577
- <p>DSL call for defining a config for a verb. The block runs within the verb DSL, positional and named arguments are passed to the verb DSL.</p>
615
+ <p class="note returns_void">This method returns an undefined value.</p>
616
+ <p>DSL method. Defines the config for one HTTP verb. The block runs within the verb DSL; positional and named arguments are forwarded to it. Call at most once per verb per standalone.</p>
578
617
 
579
618
 
580
619
  </div>
@@ -594,7 +633,7 @@
594
633
 
595
634
  &mdash;
596
635
  <div class='inline'>
597
- <p>The HTTP verb the config is for (e.g. :get, :post etc.)</p>
636
+ <p>The HTTP verb (one of <code>:get :head :post :put :delete :connect :options :trace :patch</code>).</p>
598
637
  </div>
599
638
 
600
639
  </li>
@@ -615,24 +654,24 @@
615
654
  <pre class="lines">
616
655
 
617
656
 
618
- 48
619
- 49
620
- 50
621
- 51
622
- 52
623
- 53
624
- 54
625
- 55
626
- 56
627
- 57
628
- 58
629
- 59
630
- 60
631
- 61
632
- 62</pre>
657
+ 62
658
+ 63
659
+ 64
660
+ 65
661
+ 66
662
+ 67
663
+ 68
664
+ 69
665
+ 70
666
+ 71
667
+ 72
668
+ 73
669
+ 74
670
+ 75
671
+ 76</pre>
633
672
  </td>
634
673
  <td>
635
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 48</span>
674
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 62</span>
636
675
 
637
676
  <span class='kw'>def</span> <span class='id identifier rubyid_verb'>verb</span><span class='lparen'>(</span><span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_nargs'>nargs</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='rparen'>)</span>
638
677
  <span class='id identifier rubyid_verb'>verb</span> <span class='op'>=</span> <span class='id identifier rubyid_verb'>verb</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
@@ -659,7 +698,7 @@
659
698
  </div>
660
699
 
661
700
  <div id="footer">
662
- Generated on Fri May 15 10:29:34 2026 by
701
+ Generated on Mon May 18 13:55:36 2026 by
663
702
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
664
703
  0.9.34 (ruby-3.3.5).
665
704
  </div>
@@ -168,7 +168,7 @@
168
168
  <li class="protected ">
169
169
  <span class="summary_signature">
170
170
 
171
- <a href="#authorize-instance_method" title="#authorize (instance method)">#<strong>authorize</strong>(&amp;block) &#x21d2; Object </a>
171
+ <a href="#authorize-instance_method" title="#authorize (instance method)">#<strong>authorize</strong> { ... } &#x21d2; void </a>
172
172
 
173
173
 
174
174
 
@@ -183,7 +183,7 @@
183
183
 
184
184
 
185
185
  <span class="summary_desc"><div class='inline'>
186
- <p>DSL This block is expected to return true if and only if current_ability has the right to access the component over the given verb.</p>
186
+ <p>DSL Mandatory.</p>
187
187
  </div></span>
188
188
 
189
189
  </li>
@@ -242,7 +242,7 @@
242
242
  <li class="protected ">
243
243
  <span class="summary_signature">
244
244
 
245
- <a href="#respond-instance_method" title="#respond (instance method)">#<strong>respond</strong>(format = nil, &amp;block) &#x21d2; Object </a>
245
+ <a href="#respond-instance_method" title="#respond (instance method)">#<strong>respond</strong>(format = nil) { ... } &#x21d2; void </a>
246
246
 
247
247
 
248
248
 
@@ -257,7 +257,7 @@
257
257
 
258
258
 
259
259
  <span class="summary_desc"><div class='inline'>
260
- <p>DSL This is the last step in the life cycle.</p>
260
+ <p>DSL Last step in the lifecycle.</p>
261
261
  </div></span>
262
262
 
263
263
  </li>
@@ -361,7 +361,7 @@
361
361
  <div class="method_details first">
362
362
  <h3 class="signature first" id="authorize-instance_method">
363
363
 
364
- #<strong>authorize</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
364
+ #<strong>authorize</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
365
365
 
366
366
 
367
367
 
@@ -369,14 +369,32 @@
369
369
 
370
370
  </h3><div class="docstring">
371
371
  <div class="discussion">
372
-
373
- <p>DSL This block is expected to return true if and only if current_ability has the right to access the component over the given verb.</p>
372
+ <p class="note returns_void">This method returns an undefined value.</p>
373
+ <p>DSL Mandatory. The block must return truthy iff <code>current_ability</code> may access the component over this verb; a falsy result raises <code>CanCan::AccessDenied</code>.</p>
374
374
 
375
375
 
376
376
  </div>
377
377
  </div>
378
378
  <div class="tags">
379
379
 
380
+ <p class="tag_title">Yields:</p>
381
+ <ul class="yield">
382
+
383
+ <li>
384
+
385
+
386
+ <span class='type'></span>
387
+
388
+
389
+
390
+
391
+ <div class='inline'>
392
+ <p>Runs in the component’s request context; returns truthy to grant access.</p>
393
+ </div>
394
+
395
+ </li>
396
+
397
+ </ul>
380
398
 
381
399
  </div><table class="source_code">
382
400
  <tr>
@@ -384,12 +402,12 @@
384
402
  <pre class="lines">
385
403
 
386
404
 
387
- 39
388
- 40
389
- 41</pre>
405
+ 43
406
+ 44
407
+ 45</pre>
390
408
  </td>
391
409
  <td>
392
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 39</span>
410
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 43</span>
393
411
 
394
412
  <span class='kw'>def</span> <span class='id identifier rubyid_authorize'>authorize</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
395
413
  <span class='ivar'>@authorize_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -425,15 +443,15 @@
425
443
  <pre class="lines">
426
444
 
427
445
 
428
- 51
429
- 52
430
- 53
431
- 54
432
- 55
433
- 56</pre>
446
+ 59
447
+ 60
448
+ 61
449
+ 62
450
+ 63
451
+ 64</pre>
434
452
  </td>
435
453
  <td>
436
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 51</span>
454
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 59</span>
437
455
 
438
456
  <span class='kw'>def</span> <span class='id identifier rubyid_default_config'>default_config</span>
439
457
  <span class='kw'>return</span> <span class='lbrace'>{</span>
@@ -449,7 +467,7 @@
449
467
  <div class="method_details ">
450
468
  <h3 class="signature " id="respond-instance_method">
451
469
 
452
- #<strong>respond</strong>(format = nil, &amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
470
+ #<strong>respond</strong>(format = nil) { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
453
471
 
454
472
 
455
473
 
@@ -457,8 +475,8 @@
457
475
 
458
476
  </h3><div class="docstring">
459
477
  <div class="discussion">
460
-
461
- <p>DSL This is the last step in the life cycle. It may redirect or render. If omitted, the default is standalone_render.</p>
478
+ <p class="note returns_void">This method returns an undefined value.</p>
479
+ <p>DSL Last step in the lifecycle. May redirect or render. If omitted, the default is <code>render_standalone</code>. NOTE: overriding <code>respond</code> replaces the default, which is where <code>authorize</code> is evaluated - re-check authorization yourself.</p>
462
480
 
463
481
 
464
482
  </div>
@@ -472,7 +490,7 @@
472
490
  <span class='name'>format</span>
473
491
 
474
492
 
475
- <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
493
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>, <tt>nil</tt>)</span>
476
494
 
477
495
 
478
496
  <em class="default">(defaults to: <tt>nil</tt>)</em>
@@ -480,13 +498,31 @@
480
498
 
481
499
  &mdash;
482
500
  <div class='inline'>
483
- <p>Format this block should respond to, defaults to <code>nil</code> which means “all other formats”.</p>
501
+ <p>Format this block responds to; <code>nil</code> means “all other formats”.</p>
484
502
  </div>
485
503
 
486
504
  </li>
487
505
 
488
506
  </ul>
489
507
 
508
+ <p class="tag_title">Yields:</p>
509
+ <ul class="yield">
510
+
511
+ <li>
512
+
513
+
514
+ <span class='type'></span>
515
+
516
+
517
+
518
+
519
+ <div class='inline'>
520
+ <p>Runs in the component’s request context; renders or redirects.</p>
521
+ </div>
522
+
523
+ </li>
524
+
525
+ </ul>
490
526
 
491
527
  </div><table class="source_code">
492
528
  <tr>
@@ -494,12 +530,12 @@
494
530
  <pre class="lines">
495
531
 
496
532
 
497
- 46
498
- 47
499
- 48</pre>
533
+ 54
534
+ 55
535
+ 56</pre>
500
536
  </td>
501
537
  <td>
502
- <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 46</span>
538
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 54</span>
503
539
 
504
540
  <span class='kw'>def</span> <span class='id identifier rubyid_respond'>respond</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</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>
505
541
  <span class='ivar'>@respond_blocks</span><span class='lbracket'>[</span><span class='id identifier rubyid_format'>format</span><span class='op'>&amp;.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
@@ -567,7 +603,7 @@
567
603
  </div>
568
604
 
569
605
  <div id="footer">
570
- Generated on Fri May 15 10:29:34 2026 by
606
+ Generated on Mon May 18 13:55:36 2026 by
571
607
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
572
608
  0.9.34 (ruby-3.3.5).
573
609
  </div>
@@ -868,7 +868,7 @@
868
868
  </div>
869
869
 
870
870
  <div id="footer">
871
- Generated on Fri May 15 10:29:33 2026 by
871
+ Generated on Mon May 18 13:55:35 2026 by
872
872
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
873
873
  0.9.34 (ruby-3.3.5).
874
874
  </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>