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
@@ -126,7 +126,7 @@
126
126
 
127
127
 
128
128
  <h2>
129
- Instance Method Summary
129
+ DSL
130
130
  <small><a href="#" class="summary_toggle">collapse</a></small>
131
131
  </h2>
132
132
 
@@ -159,7 +159,7 @@
159
159
  <li class="public ">
160
160
  <span class="summary_signature">
161
161
 
162
- <a href="#disable!-instance_method" title="#disable! (instance method)">#<strong>disable!</strong> &#x21d2; Object </a>
162
+ <a href="#disable!-instance_method" title="#disable! (instance method)">#<strong>disable!</strong> &#x21d2; void </a>
163
163
 
164
164
 
165
165
 
@@ -183,7 +183,7 @@
183
183
  <li class="public ">
184
184
  <span class="summary_signature">
185
185
 
186
- <a href="#f-instance_method" title="#f (instance method)">#<strong>f</strong> &#x21d2; Object </a>
186
+ <a href="#f-instance_method" title="#f (instance method)">#<strong>f</strong> &#x21d2; SimpleForm::FormBuilder </a>
187
187
 
188
188
 
189
189
 
@@ -198,7 +198,7 @@
198
198
 
199
199
 
200
200
  <span class="summary_desc"><div class='inline'>
201
- <p>Called inside the form_fields block.</p>
201
+ <p>DSL method (inside <code>form_fields</code>).</p>
202
202
  </div></span>
203
203
 
204
204
  </li>
@@ -207,7 +207,7 @@
207
207
  <li class="public ">
208
208
  <span class="summary_signature">
209
209
 
210
- <a href="#field-instance_method" title="#field (instance method)">#<strong>field</strong>(name, multilang: false, **input_opts) &#x21d2; Object </a>
210
+ <a href="#field-instance_method" title="#field (instance method)">#<strong>field</strong>(name, multilang: false, **input_opts) &#x21d2; String<sup>+</sup> </a>
211
211
 
212
212
 
213
213
 
@@ -222,7 +222,7 @@
222
222
 
223
223
 
224
224
  <span class="summary_desc"><div class='inline'>
225
- <p>Called inside the form_fields block.</p>
225
+ <p>DSL method (inside <code>form_fields</code>).</p>
226
226
  </div></span>
227
227
 
228
228
  </li>
@@ -231,7 +231,7 @@
231
231
  <li class="public ">
232
232
  <span class="summary_signature">
233
233
 
234
- <a href="#form_fields-instance_method" title="#form_fields (instance method)">#<strong>form_fields</strong>(&amp;block) &#x21d2; Object </a>
234
+ <a href="#form_fields-instance_method" title="#form_fields (instance method)">#<strong>form_fields</strong> { ... } &#x21d2; Proc<sup>?</sup> </a>
235
235
 
236
236
 
237
237
 
@@ -246,7 +246,7 @@
246
246
 
247
247
 
248
248
  <span class="summary_desc"><div class='inline'>
249
- <p>DSL method, use to set the form content.</p>
249
+ <p>DSL method, use to set the form content (mandatory).</p>
250
250
  </div></span>
251
251
 
252
252
  </li>
@@ -255,7 +255,7 @@
255
255
  <li class="public ">
256
256
  <span class="summary_signature">
257
257
 
258
- <a href="#form_params-instance_method" title="#form_params (instance method)">#<strong>form_params</strong>(**new_form_params) &#x21d2; Object </a>
258
+ <a href="#form_params-instance_method" title="#form_params (instance method)">#<strong>form_params</strong>(**new_form_params) &#x21d2; void </a>
259
259
 
260
260
 
261
261
 
@@ -270,7 +270,7 @@
270
270
 
271
271
 
272
272
  <span class="summary_desc"><div class='inline'>
273
- <p>DSL method, allows to customize parameters given to simple_form_for.</p>
273
+ <p>DSL method, customizes the parameters given to <code>simple_form_for</code>.</p>
274
274
  </div></span>
275
275
 
276
276
  </li>
@@ -279,15 +279,13 @@
279
279
  <li class="public ">
280
280
  <span class="summary_signature">
281
281
 
282
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args, cancancan_action: :missing, disabled: false, **kwargs) &#x21d2; Form </a>
282
+ <a href="#pw_field-instance_method" title="#pw_field (instance method)">#<strong>pw_field</strong>(name, **input_opts) &#x21d2; String<sup>?</sup> </a>
283
283
 
284
284
 
285
285
 
286
286
  </span>
287
287
 
288
288
 
289
- <span class="note title constructor">constructor</span>
290
-
291
289
 
292
290
 
293
291
 
@@ -296,16 +294,16 @@
296
294
 
297
295
 
298
296
  <span class="summary_desc"><div class='inline'>
299
- <p>A new instance of Form.</p>
297
+ <p>DSL method (inside <code>form_fields</code>).</p>
300
298
  </div></span>
301
299
 
302
300
  </li>
303
301
 
304
302
 
305
- <li class="public ">
303
+ <li class="protected ">
306
304
  <span class="summary_signature">
307
305
 
308
- <a href="#pw_field-instance_method" title="#pw_field (instance method)">#<strong>pw_field</strong>(name, **input_opts) &#x21d2; Object </a>
306
+ <a href="#schema-instance_method" title="#schema (instance method)">#<strong>schema</strong>(wrapper_key) { ... } &#x21d2; void </a>
309
307
 
310
308
 
311
309
 
@@ -313,23 +311,23 @@
313
311
 
314
312
 
315
313
 
316
-
314
+ <span class="note title protected">protected</span>
317
315
 
318
316
 
319
317
 
320
318
 
321
319
 
322
320
  <span class="summary_desc"><div class='inline'>
323
- <p>Called inside the form_fields block.</p>
321
+ <p>DSL method, replaces the form’s schema and wrapper key with a completely manual Schemacop3 schema.</p>
324
322
  </div></span>
325
323
 
326
324
  </li>
327
325
 
328
326
 
329
- <li class="protected ">
327
+ <li class="public ">
330
328
  <span class="summary_signature">
331
329
 
332
- <a href="#schema-instance_method" title="#schema (instance method)">#<strong>schema</strong>(wrapper_key, &amp;block) &#x21d2; Object </a>
330
+ <a href="#schema_block_for-instance_method" title="#schema_block_for (instance method)">#<strong>schema_block_for</strong>(data, controller) &#x21d2; Object </a>
333
331
 
334
332
 
335
333
 
@@ -337,23 +335,23 @@
337
335
 
338
336
 
339
337
 
340
- <span class="note title protected">protected</span>
338
+
341
339
 
342
340
 
343
341
 
344
342
 
345
343
 
346
344
  <span class="summary_desc"><div class='inline'>
347
- <p>DSL method, use to replace the form’s schema and wrapper key for a completely manual schema.</p>
345
+ <p>Attr reader for @schema_block with auto-calculated default.</p>
348
346
  </div></span>
349
347
 
350
348
  </li>
351
349
 
352
350
 
353
- <li class="public ">
351
+ <li class="protected ">
354
352
  <span class="summary_signature">
355
353
 
356
- <a href="#schema_block_for-instance_method" title="#schema_block_for (instance method)">#<strong>schema_block_for</strong>(data, controller) &#x21d2; Object </a>
354
+ <a href="#schema_field-instance_method" title="#schema_field (instance method)">#<strong>schema_field</strong>(field_name, multilang: false) &#x21d2; void </a>
357
355
 
358
356
 
359
357
 
@@ -361,14 +359,14 @@
361
359
 
362
360
 
363
361
 
364
-
362
+ <span class="note title protected">protected</span>
365
363
 
366
364
 
367
365
 
368
366
 
369
367
 
370
368
  <span class="summary_desc"><div class='inline'>
371
- <p>Attr reader for @schema_block with auto-calculated default.</p>
369
+ <p>DSL method, whitelists a single field of <code>data_class</code> in the param schema, auto-generating the correct schema line.</p>
372
370
  </div></span>
373
371
 
374
372
  </li>
@@ -377,7 +375,7 @@
377
375
  <li class="protected ">
378
376
  <span class="summary_signature">
379
377
 
380
- <a href="#schema_field-instance_method" title="#schema_field (instance method)">#<strong>schema_field</strong>(field_name, multilang: false) &#x21d2; Object </a>
378
+ <a href="#schema_fields-instance_method" title="#schema_fields (instance method)">#<strong>schema_fields</strong>(*field_names) &#x21d2; void </a>
381
379
 
382
380
 
383
381
 
@@ -392,7 +390,7 @@
392
390
 
393
391
 
394
392
  <span class="summary_desc"><div class='inline'>
395
- <p>DSL method, adds a new field to the schema whitelisting a single field of data_class This auto-generates the correct schema line for the field.</p>
393
+ <p>DSL method, whitelists several fields at once (see <span class='object_link'><a href="#schema_field-instance_method" title="Compony::Components::Form#schema_field (method)">#schema_field</a></span>).</p>
396
394
  </div></span>
397
395
 
398
396
  </li>
@@ -401,7 +399,7 @@
401
399
  <li class="protected ">
402
400
  <span class="summary_signature">
403
401
 
404
- <a href="#schema_fields-instance_method" title="#schema_fields (instance method)">#<strong>schema_fields</strong>(*field_names) &#x21d2; Object </a>
402
+ <a href="#schema_line-instance_method" title="#schema_line (instance method)">#<strong>schema_line</strong> { ... } &#x21d2; void </a>
405
403
 
406
404
 
407
405
 
@@ -416,7 +414,7 @@
416
414
 
417
415
 
418
416
  <span class="summary_desc"><div class='inline'>
419
- <p>DSL method, mass-assigns schema fields.</p>
417
+ <p>DSL method, adds a Schemacop3 line whitelisting param(s) inside the schema’s wrapper.</p>
420
418
  </div></span>
421
419
 
422
420
  </li>
@@ -425,7 +423,7 @@
425
423
  <li class="protected ">
426
424
  <span class="summary_signature">
427
425
 
428
- <a href="#schema_line-instance_method" title="#schema_line (instance method)">#<strong>schema_line</strong>(&amp;block) &#x21d2; Object </a>
426
+ <a href="#schema_pw_field-instance_method" title="#schema_pw_field (instance method)">#<strong>schema_pw_field</strong>(field_name) &#x21d2; void </a>
429
427
 
430
428
 
431
429
 
@@ -440,16 +438,16 @@
440
438
 
441
439
 
442
440
  <span class="summary_desc"><div class='inline'>
443
- <p>DSL method, adds a new line to the schema whitelisting a single param inside the schema’s wrapper The block should be something like <code>str? :foo</code> and will run in a Schemacop3 context.</p>
441
+ <p>DSL method, whitelists a password param in the schema (checks the <code>:set_password</code> permission).</p>
444
442
  </div></span>
445
443
 
446
444
  </li>
447
445
 
448
446
 
449
- <li class="protected ">
447
+ <li class="public ">
450
448
  <span class="summary_signature">
451
449
 
452
- <a href="#schema_pw_field-instance_method" title="#schema_pw_field (instance method)">#<strong>schema_pw_field</strong>(field_name) &#x21d2; Object </a>
450
+ <a href="#schema_wrapper_key_for-instance_method" title="#schema_wrapper_key_for (instance method)">#<strong>schema_wrapper_key_for</strong>(data) &#x21d2; Object </a>
453
451
 
454
452
 
455
453
 
@@ -457,23 +455,23 @@
457
455
 
458
456
 
459
457
 
460
- <span class="note title protected">protected</span>
458
+
461
459
 
462
460
 
463
461
 
464
462
 
465
463
 
466
464
  <span class="summary_desc"><div class='inline'>
467
- <p>DSL method, adds a new password field to the schema whitelisting This checks for the permission :set_password and auto-generates the correct schema line for the field.</p>
465
+ <p>Attr reader for @schema_wrapper_key with auto-calculated default.</p>
468
466
  </div></span>
469
467
 
470
468
  </li>
471
469
 
472
470
 
473
- <li class="public ">
471
+ <li class="protected ">
474
472
  <span class="summary_signature">
475
473
 
476
- <a href="#schema_wrapper_key_for-instance_method" title="#schema_wrapper_key_for (instance method)">#<strong>schema_wrapper_key_for</strong>(data) &#x21d2; Object </a>
474
+ <a href="#skip_autofocus-instance_method" title="#skip_autofocus (instance method)">#<strong>skip_autofocus</strong> &#x21d2; void </a>
477
475
 
478
476
 
479
477
 
@@ -481,23 +479,23 @@
481
479
 
482
480
 
483
481
 
484
-
482
+ <span class="note title protected">protected</span>
485
483
 
486
484
 
487
485
 
488
486
 
489
487
 
490
488
  <span class="summary_desc"><div class='inline'>
491
- <p>Attr reader for @schema_wrapper_key with auto-calculated default.</p>
489
+ <p>DSL method, skips adding autofocus to the first field.</p>
492
490
  </div></span>
493
491
 
494
492
  </li>
495
493
 
496
494
 
497
- <li class="protected ">
495
+ <li class="public ">
498
496
  <span class="summary_signature">
499
497
 
500
- <a href="#skip_autofocus-instance_method" title="#skip_autofocus (instance method)">#<strong>skip_autofocus</strong> &#x21d2; Object </a>
498
+ <a href="#with_simpleform-instance_method" title="#with_simpleform (instance method)">#<strong>with_simpleform</strong>(simpleform, controller) &#x21d2; Object </a>
501
499
 
502
500
 
503
501
 
@@ -505,29 +503,40 @@
505
503
 
506
504
 
507
505
 
508
- <span class="note title protected">protected</span>
506
+
509
507
 
510
508
 
511
509
 
512
510
 
513
511
 
514
512
  <span class="summary_desc"><div class='inline'>
515
- <p>DSL method, skips adding autofocus to the first field.</p>
513
+ <p>This method is used by render to store the simpleform instance inside the component such that we can call methods from inside <code>form_fields</code>.</p>
516
514
  </div></span>
517
515
 
518
516
  </li>
519
517
 
520
518
 
519
+ </ul>
520
+
521
+ <h2>
522
+ Instance Method Summary
523
+ <small><a href="#" class="summary_toggle">collapse</a></small>
524
+ </h2>
525
+
526
+ <ul class="summary">
527
+
521
528
  <li class="public ">
522
529
  <span class="summary_signature">
523
530
 
524
- <a href="#with_simpleform-instance_method" title="#with_simpleform (instance method)">#<strong>with_simpleform</strong>(simpleform, controller) &#x21d2; Object </a>
531
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args, cancancan_action: :missing, disabled: false, **kwargs) &#x21d2; Form </a>
525
532
 
526
533
 
527
534
 
528
535
  </span>
529
536
 
530
537
 
538
+ <span class="note title constructor">constructor</span>
539
+
531
540
 
532
541
 
533
542
 
@@ -536,7 +545,7 @@
536
545
 
537
546
 
538
547
  <span class="summary_desc"><div class='inline'>
539
- <p>This method is used by render to store the simpleform instance inside the component such that we can call methods from inside <code>form_fields</code>.</p>
548
+ <p>A new instance of Form.</p>
540
549
  </div></span>
541
550
 
542
551
  </li>
@@ -639,12 +648,12 @@
639
648
  <pre class="lines">
640
649
 
641
650
 
642
- 167
643
- 168
644
- 169</pre>
651
+ 182
652
+ 183
653
+ 184</pre>
645
654
  </td>
646
655
  <td>
647
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 167</span>
656
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 182</span>
648
657
 
649
658
  <span class='kw'>def</span> <span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span>
650
659
  <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ModelFields.html" title="Compony::ModelFields (module)">ModelFields</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ModelFields/Anchormodel.html" title="Compony::ModelFields::Anchormodel (class)">Anchormodel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_collect'><span class='object_link'><a href="../ModelFields/Anchormodel.html#collect-class_method" title="Compony::ModelFields::Anchormodel.collect (method)">collect</a></span></span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span>
@@ -657,7 +666,7 @@
657
666
  <div class="method_details ">
658
667
  <h3 class="signature " id="disable!-instance_method">
659
668
 
660
- #<strong>disable!</strong> &#x21d2; <tt>Object</tt>
669
+ #<strong>disable!</strong> &#x21d2; <tt>void</tt>
661
670
 
662
671
 
663
672
 
@@ -665,8 +674,8 @@
665
674
 
666
675
  </h3><div class="docstring">
667
676
  <div class="discussion">
668
-
669
- <p>DSL method, disables all inputs</p>
677
+ <p class="note returns_void">This method returns an undefined value.</p>
678
+ <p>DSL method, disables all inputs.</p>
670
679
 
671
680
 
672
681
  </div>
@@ -680,12 +689,12 @@
680
689
  <pre class="lines">
681
690
 
682
691
 
683
- 172
684
- 173
685
- 174</pre>
692
+ 189
693
+ 190
694
+ 191</pre>
686
695
  </td>
687
696
  <td>
688
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 172</span>
697
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 189</span>
689
698
 
690
699
  <span class='kw'>def</span> <span class='id identifier rubyid_disable!'>disable!</span>
691
700
  <span class='ivar'>@form_disabled</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -698,7 +707,7 @@
698
707
  <div class="method_details ">
699
708
  <h3 class="signature " id="f-instance_method">
700
709
 
701
- #<strong>f</strong> &#x21d2; <tt>Object</tt>
710
+ #<strong>f</strong> &#x21d2; <tt>SimpleForm::FormBuilder</tt>
702
711
 
703
712
 
704
713
 
@@ -707,13 +716,31 @@
707
716
  </h3><div class="docstring">
708
717
  <div class="discussion">
709
718
 
710
- <p>Called inside the form_fields block. This makes the method <code>f</code> available in the block. See also notes for <code>with_simpleform</code>.</p>
719
+ <p>DSL method (inside <code>form_fields</code>). Returns the underlying simple_form builder, e.g. for <code>f.rich_text_area</code> or <code>f.simple_fields_for</code> (nested attributes).</p>
711
720
 
712
721
 
713
722
  </div>
714
723
  </div>
715
724
  <div class="tags">
716
725
 
726
+ <p class="tag_title">Returns:</p>
727
+ <ul class="return">
728
+
729
+ <li>
730
+
731
+
732
+ <span class='type'>(<tt>SimpleForm::FormBuilder</tt>)</span>
733
+
734
+
735
+
736
+ &mdash;
737
+ <div class='inline'>
738
+ <p>The simple_form builder for the current form.</p>
739
+ </div>
740
+
741
+ </li>
742
+
743
+ </ul>
717
744
 
718
745
  </div><table class="source_code">
719
746
  <tr>
@@ -721,13 +748,13 @@
721
748
  <pre class="lines">
722
749
 
723
750
 
724
- 161
725
- 162
726
- 163
727
- 164</pre>
751
+ 176
752
+ 177
753
+ 178
754
+ 179</pre>
728
755
  </td>
729
756
  <td>
730
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 161</span>
757
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 176</span>
731
758
 
732
759
  <span class='kw'>def</span> <span class='id identifier rubyid_f'>f</span>
733
760
  <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'>The `f` method may only be called inside `form_fields` for </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='ivar'>@simpleform</span>
@@ -741,7 +768,7 @@
741
768
  <div class="method_details ">
742
769
  <h3 class="signature " id="field-instance_method">
743
770
 
744
- #<strong>field</strong>(name, multilang: false, **input_opts) &#x21d2; <tt>Object</tt>
771
+ #<strong>field</strong>(name, multilang: false, **input_opts) &#x21d2; <tt>String</tt><sup>+</sup>
745
772
 
746
773
 
747
774
 
@@ -750,13 +777,85 @@
750
777
  </h3><div class="docstring">
751
778
  <div class="discussion">
752
779
 
753
- <p>Called inside the form_fields block. This makes the method <code>field</code> available in the block. See also notes for <code>with_simpleform</code>. If multilang is true, a suffixed field is generated for every available locale (useful with gem “mobility”). Render the array as you wish.</p>
780
+ <p>DSL method (inside <code>form_fields</code>). Renders a simple_form input inferred from the model field <code>name</code>. Respects per-field CanCanCan authorization; skipped fields render nothing.</p>
754
781
 
755
782
 
756
783
  </div>
757
784
  </div>
758
785
  <div class="tags">
786
+ <p class="tag_title">Parameters:</p>
787
+ <ul class="param">
759
788
 
789
+ <li>
790
+
791
+ <span class='name'>name</span>
792
+
793
+
794
+ <span class='type'>(<tt>Symbol</tt>, <tt>String</tt>)</span>
795
+
796
+
797
+
798
+ &mdash;
799
+ <div class='inline'>
800
+ <p>The model field (use the association name, not the <code>_id</code>, for associations).</p>
801
+ </div>
802
+
803
+ </li>
804
+
805
+ <li>
806
+
807
+ <span class='name'>multilang</span>
808
+
809
+
810
+ <span class='type'>(<tt>Boolean</tt>)</span>
811
+
812
+
813
+ <em class="default">(defaults to: <tt>false</tt>)</em>
814
+
815
+
816
+ &mdash;
817
+ <div class='inline'>
818
+ <p>If true, generates one suffixed input per available locale and returns the array (useful with the “mobility” gem).</p>
819
+ </div>
820
+
821
+ </li>
822
+
823
+ <li>
824
+
825
+ <span class='name'>input_opts</span>
826
+
827
+
828
+ <span class='type'>(<tt>Hash</tt>)</span>
829
+
830
+
831
+
832
+ &mdash;
833
+ <div class='inline'>
834
+ <p>Passed to simple_form. Notable keys: <code>as:</code> (input type), <code>hidden: true</code>, <code>autofocus:</code>.</p>
835
+ </div>
836
+
837
+ </li>
838
+
839
+ </ul>
840
+
841
+ <p class="tag_title">Returns:</p>
842
+ <ul class="return">
843
+
844
+ <li>
845
+
846
+
847
+ <span class='type'>(<tt>String</tt>, <tt>Array&lt;String&gt;</tt>)</span>
848
+
849
+
850
+
851
+ &mdash;
852
+ <div class='inline'>
853
+ <p>The input HTML (array when <code>multilang</code>).</p>
854
+ </div>
855
+
856
+ </li>
857
+
858
+ </ul>
760
859
 
761
860
  </div><table class="source_code">
762
861
  <tr>
@@ -764,16 +863,6 @@
764
863
  <pre class="lines">
765
864
 
766
865
 
767
- 103
768
- 104
769
- 105
770
- 106
771
- 107
772
- 108
773
- 109
774
- 110
775
- 111
776
- 112
777
866
  113
778
867
  114
779
868
  115
@@ -796,10 +885,20 @@
796
885
  132
797
886
  133
798
887
  134
799
- 135</pre>
888
+ 135
889
+ 136
890
+ 137
891
+ 138
892
+ 139
893
+ 140
894
+ 141
895
+ 142
896
+ 143
897
+ 144
898
+ 145</pre>
800
899
  </td>
801
900
  <td>
802
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 103</span>
901
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 113</span>
803
902
 
804
903
  <span class='kw'>def</span> <span class='id identifier rubyid_field'>field</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>multilang:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_input_opts'>input_opts</span><span class='rparen'>)</span>
805
904
  <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'>The `field` method may only be called inside `form_fields` for </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='ivar'>@simpleform</span>
@@ -842,7 +941,7 @@
842
941
  <div class="method_details ">
843
942
  <h3 class="signature " id="form_fields-instance_method">
844
943
 
845
- #<strong>form_fields</strong>(&amp;block) &#x21d2; <tt>Object</tt>
944
+ #<strong>form_fields</strong> { ... } &#x21d2; <tt>Proc</tt><sup>?</sup>
846
945
 
847
946
 
848
947
 
@@ -851,13 +950,49 @@
851
950
  </h3><div class="docstring">
852
951
  <div class="discussion">
853
952
 
854
- <p>DSL method, use to set the form content</p>
953
+ <p>DSL method, use to set the form content (mandatory). The block holds the form inputs and is instance-exec’d in the form’s request context where <code>field</code>, <code>pw_field</code> and <code>f</code> are available.</p>
855
954
 
856
955
 
857
956
  </div>
858
957
  </div>
859
958
  <div class="tags">
860
959
 
960
+ <p class="tag_title">Yields:</p>
961
+ <ul class="yield">
962
+
963
+ <li>
964
+
965
+
966
+ <span class='type'></span>
967
+
968
+
969
+
970
+
971
+ <div class='inline'>
972
+ <p>Builds the form body using Dyny + the form field helpers.</p>
973
+ </div>
974
+
975
+ </li>
976
+
977
+ </ul>
978
+ <p class="tag_title">Returns:</p>
979
+ <ul class="return">
980
+
981
+ <li>
982
+
983
+
984
+ <span class='type'>(<tt>Proc</tt>, <tt>nil</tt>)</span>
985
+
986
+
987
+
988
+ &mdash;
989
+ <div class='inline'>
990
+ <p>When called without a block, returns the stored block.</p>
991
+ </div>
992
+
993
+ </li>
994
+
995
+ </ul>
861
996
 
862
997
  </div><table class="source_code">
863
998
  <tr>
@@ -865,13 +1000,13 @@
865
1000
  <pre class="lines">
866
1001
 
867
1002
 
868
- 56
869
- 57
870
- 58
871
- 59</pre>
1003
+ 62
1004
+ 63
1005
+ 64
1006
+ 65</pre>
872
1007
  </td>
873
1008
  <td>
874
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 56</span>
1009
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 62</span>
875
1010
 
876
1011
  <span class='kw'>def</span> <span class='id identifier rubyid_form_fields'>form_fields</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
877
1012
  <span class='kw'>return</span> <span class='ivar'>@form_fields</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
@@ -885,7 +1020,7 @@
885
1020
  <div class="method_details ">
886
1021
  <h3 class="signature " id="form_params-instance_method">
887
1022
 
888
- #<strong>form_params</strong>(**new_form_params) &#x21d2; <tt>Object</tt>
1023
+ #<strong>form_params</strong>(**new_form_params) &#x21d2; <tt>void</tt>
889
1024
 
890
1025
 
891
1026
 
@@ -893,14 +1028,34 @@
893
1028
 
894
1029
  </h3><div class="docstring">
895
1030
  <div class="discussion">
896
-
897
- <p>DSL method, allows to customize parameters given to simple_form_for</p>
1031
+ <p class="note returns_void">This method returns an undefined value.</p>
1032
+ <p>DSL method, customizes the parameters given to <code>simple_form_for</code>.</p>
898
1033
 
899
1034
 
900
1035
  </div>
901
1036
  </div>
902
1037
  <div class="tags">
1038
+ <p class="tag_title">Parameters:</p>
1039
+ <ul class="param">
903
1040
 
1041
+ <li>
1042
+
1043
+ <span class='name'>new_form_params</span>
1044
+
1045
+
1046
+ <span class='type'>(<tt>Hash</tt>)</span>
1047
+
1048
+
1049
+
1050
+ &mdash;
1051
+ <div class='inline'>
1052
+ <p>Extra kwargs forwarded to <code>simple_form_for</code>.</p>
1053
+ </div>
1054
+
1055
+ </li>
1056
+
1057
+ </ul>
1058
+
904
1059
 
905
1060
  </div><table class="source_code">
906
1061
  <tr>
@@ -908,12 +1063,12 @@
908
1063
  <pre class="lines">
909
1064
 
910
1065
 
911
- 177
912
- 178
913
- 179</pre>
1066
+ 197
1067
+ 198
1068
+ 199</pre>
914
1069
  </td>
915
1070
  <td>
916
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 177</span>
1071
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 197</span>
917
1072
 
918
1073
  <span class='kw'>def</span> <span class='id identifier rubyid_form_params'>form_params</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_new_form_params'>new_form_params</span><span class='rparen'>)</span>
919
1074
  <span class='ivar'>@form_params</span> <span class='op'>=</span> <span class='id identifier rubyid_new_form_params'>new_form_params</span>
@@ -926,7 +1081,7 @@
926
1081
  <div class="method_details ">
927
1082
  <h3 class="signature " id="pw_field-instance_method">
928
1083
 
929
- #<strong>pw_field</strong>(name, **input_opts) &#x21d2; <tt>Object</tt>
1084
+ #<strong>pw_field</strong>(name, **input_opts) &#x21d2; <tt>String</tt><sup>?</sup>
930
1085
 
931
1086
 
932
1087
 
@@ -935,13 +1090,67 @@
935
1090
  </h3><div class="docstring">
936
1091
  <div class="discussion">
937
1092
 
938
- <p>Called inside the form_fields block. This makes the method pw_field available in the block. This method should be called for the fields :password and :password_confirmation Note that :hidden is not supported here, as this would make no sense in conjunction with :password or :password_confirmation.</p>
1093
+ <p>DSL method (inside <code>form_fields</code>). Renders a password input; should be used for <code>:password</code> and <code>:password_confirmation</code>. Checks the <code>:set_password</code> CanCanCan ability; <code>:hidden</code> is intentionally unsupported here.</p>
939
1094
 
940
1095
 
941
1096
  </div>
942
1097
  </div>
943
1098
  <div class="tags">
1099
+ <p class="tag_title">Parameters:</p>
1100
+ <ul class="param">
944
1101
 
1102
+ <li>
1103
+
1104
+ <span class='name'>name</span>
1105
+
1106
+
1107
+ <span class='type'>(<tt>Symbol</tt>, <tt>String</tt>)</span>
1108
+
1109
+
1110
+
1111
+ &mdash;
1112
+ <div class='inline'>
1113
+ <p>The password field name.</p>
1114
+ </div>
1115
+
1116
+ </li>
1117
+
1118
+ <li>
1119
+
1120
+ <span class='name'>input_opts</span>
1121
+
1122
+
1123
+ <span class='type'>(<tt>Hash</tt>)</span>
1124
+
1125
+
1126
+
1127
+ &mdash;
1128
+ <div class='inline'>
1129
+ <p>Passed to simple_form.</p>
1130
+ </div>
1131
+
1132
+ </li>
1133
+
1134
+ </ul>
1135
+
1136
+ <p class="tag_title">Returns:</p>
1137
+ <ul class="return">
1138
+
1139
+ <li>
1140
+
1141
+
1142
+ <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
1143
+
1144
+
1145
+
1146
+ &mdash;
1147
+ <div class='inline'>
1148
+ <p>The input HTML, or nil if not permitted.</p>
1149
+ </div>
1150
+
1151
+ </li>
1152
+
1153
+ </ul>
945
1154
 
946
1155
  </div><table class="source_code">
947
1156
  <tr>
@@ -949,27 +1158,27 @@
949
1158
  <pre class="lines">
950
1159
 
951
1160
 
952
- 140
953
- 141
954
- 142
955
- 143
956
- 144
957
- 145
958
- 146
959
- 147
960
- 148
961
- 149
962
- 150
963
- 151
964
- 152
965
1161
  153
966
1162
  154
967
1163
  155
968
1164
  156
969
- 157</pre>
1165
+ 157
1166
+ 158
1167
+ 159
1168
+ 160
1169
+ 161
1170
+ 162
1171
+ 163
1172
+ 164
1173
+ 165
1174
+ 166
1175
+ 167
1176
+ 168
1177
+ 169
1178
+ 170</pre>
970
1179
  </td>
971
1180
  <td>
972
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 140</span>
1181
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 153</span>
973
1182
 
974
1183
  <span class='kw'>def</span> <span class='id identifier rubyid_pw_field'>pw_field</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_input_opts'>input_opts</span><span class='rparen'>)</span>
975
1184
  <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'>The `pw_field` method may only be called inside `form_fields` for </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='ivar'>@simpleform</span>
@@ -997,7 +1206,7 @@
997
1206
  <div class="method_details ">
998
1207
  <h3 class="signature " id="schema-instance_method">
999
1208
 
1000
- #<strong>schema</strong>(wrapper_key, &amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1209
+ #<strong>schema</strong>(wrapper_key) { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1001
1210
 
1002
1211
 
1003
1212
 
@@ -1005,14 +1214,52 @@
1005
1214
 
1006
1215
  </h3><div class="docstring">
1007
1216
  <div class="discussion">
1008
-
1009
- <p>DSL method, use to replace the form’s schema and wrapper key for a completely manual schema</p>
1217
+ <p class="note returns_void">This method returns an undefined value.</p>
1218
+ <p>DSL method, replaces the form’s schema and wrapper key with a completely manual Schemacop3 schema.</p>
1010
1219
 
1011
1220
 
1012
1221
  </div>
1013
1222
  </div>
1014
1223
  <div class="tags">
1224
+ <p class="tag_title">Parameters:</p>
1225
+ <ul class="param">
1015
1226
 
1227
+ <li>
1228
+
1229
+ <span class='name'>wrapper_key</span>
1230
+
1231
+
1232
+ <span class='type'>(<tt>Symbol</tt>, <tt>String</tt>)</span>
1233
+
1234
+
1235
+
1236
+ &mdash;
1237
+ <div class='inline'>
1238
+ <p>The top-level params wrapper key (e.g. the model’s singular name).</p>
1239
+ </div>
1240
+
1241
+ </li>
1242
+
1243
+ </ul>
1244
+
1245
+ <p class="tag_title">Yields:</p>
1246
+ <ul class="yield">
1247
+
1248
+ <li>
1249
+
1250
+
1251
+ <span class='type'></span>
1252
+
1253
+
1254
+
1255
+
1256
+ <div class='inline'>
1257
+ <p>Runs in a Schemacop3 context defining the wrapped params.</p>
1258
+ </div>
1259
+
1260
+ </li>
1261
+
1262
+ </ul>
1016
1263
 
1017
1264
  </div><table class="source_code">
1018
1265
  <tr>
@@ -1020,17 +1267,17 @@
1020
1267
  <pre class="lines">
1021
1268
 
1022
1269
 
1023
- 235
1024
- 236
1025
- 237
1026
- 238
1027
- 239
1028
- 240
1029
- 241
1030
- 242</pre>
1270
+ 273
1271
+ 274
1272
+ 275
1273
+ 276
1274
+ 277
1275
+ 278
1276
+ 279
1277
+ 280</pre>
1031
1278
  </td>
1032
1279
  <td>
1033
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 235</span>
1280
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 273</span>
1034
1281
 
1035
1282
  <span class='kw'>def</span> <span class='id identifier rubyid_schema'>schema</span><span class='lparen'>(</span><span class='id identifier rubyid_wrapper_key'>wrapper_key</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1036
1283
  <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
@@ -1071,12 +1318,6 @@
1071
1318
  <pre class="lines">
1072
1319
 
1073
1320
 
1074
- 72
1075
- 73
1076
- 74
1077
- 75
1078
- 76
1079
- 77
1080
1321
  78
1081
1322
  79
1082
1323
  80
@@ -1084,10 +1325,16 @@
1084
1325
  82
1085
1326
  83
1086
1327
  84
1087
- 85</pre>
1328
+ 85
1329
+ 86
1330
+ 87
1331
+ 88
1332
+ 89
1333
+ 90
1334
+ 91</pre>
1088
1335
  </td>
1089
1336
  <td>
1090
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 72</span>
1337
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 78</span>
1091
1338
 
1092
1339
  <span class='kw'>def</span> <span class='id identifier rubyid_schema_block_for'>schema_block_for</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
1093
1340
  <span class='kw'>if</span> <span class='ivar'>@schema_block</span>
@@ -1111,7 +1358,7 @@
1111
1358
  <div class="method_details ">
1112
1359
  <h3 class="signature " id="schema_field-instance_method">
1113
1360
 
1114
- #<strong>schema_field</strong>(field_name, multilang: false) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1361
+ #<strong>schema_field</strong>(field_name, multilang: false) &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1115
1362
 
1116
1363
 
1117
1364
 
@@ -1119,14 +1366,52 @@
1119
1366
 
1120
1367
  </h3><div class="docstring">
1121
1368
  <div class="discussion">
1122
-
1123
- <p>DSL method, adds a new field to the schema whitelisting a single field of data_class This auto-generates the correct schema line for the field. If multilang is true, a suffixed field is generated for every available locale (useful with gem “mobility”)</p>
1369
+ <p class="note returns_void">This method returns an undefined value.</p>
1370
+ <p>DSL method, whitelists a single field of <code>data_class</code> in the param schema, auto-generating the correct schema line. Respects per-field CanCanCan authorization.</p>
1124
1371
 
1125
1372
 
1126
1373
  </div>
1127
1374
  </div>
1128
1375
  <div class="tags">
1376
+ <p class="tag_title">Parameters:</p>
1377
+ <ul class="param">
1378
+
1379
+ <li>
1380
+
1381
+ <span class='name'>field_name</span>
1382
+
1383
+
1384
+ <span class='type'>(<tt>Symbol</tt>, <tt>String</tt>)</span>
1385
+
1386
+
1387
+
1388
+ &mdash;
1389
+ <div class='inline'>
1390
+ <p>The model field (association name, not <code>_id</code>, for associations).</p>
1391
+ </div>
1392
+
1393
+ </li>
1394
+
1395
+ <li>
1396
+
1397
+ <span class='name'>multilang</span>
1398
+
1399
+
1400
+ <span class='type'>(<tt>Boolean</tt>)</span>
1401
+
1402
+
1403
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1404
+
1405
+
1406
+ &mdash;
1407
+ <div class='inline'>
1408
+ <p>If true, whitelists one suffixed field per available locale (useful with the “mobility” gem).</p>
1409
+ </div>
1410
+
1411
+ </li>
1129
1412
 
1413
+ </ul>
1414
+
1130
1415
 
1131
1416
  </div><table class="source_code">
1132
1417
  <tr>
@@ -1134,28 +1419,28 @@
1134
1419
  <pre class="lines">
1135
1420
 
1136
1421
 
1137
- 192
1138
- 193
1139
- 194
1140
- 195
1141
- 196
1142
- 197
1143
- 198
1144
- 199
1145
- 200
1146
- 201
1147
- 202
1148
- 203
1149
- 204
1150
- 205
1151
- 206
1152
- 207
1153
- 208
1154
- 209
1155
- 210</pre>
1422
+ 221
1423
+ 222
1424
+ 223
1425
+ 224
1426
+ 225
1427
+ 226
1428
+ 227
1429
+ 228
1430
+ 229
1431
+ 230
1432
+ 231
1433
+ 232
1434
+ 233
1435
+ 234
1436
+ 235
1437
+ 236
1438
+ 237
1439
+ 238
1440
+ 239</pre>
1156
1441
  </td>
1157
1442
  <td>
1158
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 192</span>
1443
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 221</span>
1159
1444
 
1160
1445
  <span class='kw'>def</span> <span class='id identifier rubyid_schema_field'>schema_field</span><span class='lparen'>(</span><span class='id identifier rubyid_field_name'>field_name</span><span class='comma'>,</span> <span class='label'>multilang:</span> <span class='kw'>false</span><span class='rparen'>)</span>
1161
1446
  <span class='kw'>if</span> <span class='id identifier rubyid_multilang'>multilang</span>
@@ -1184,7 +1469,7 @@
1184
1469
  <div class="method_details ">
1185
1470
  <h3 class="signature " id="schema_fields-instance_method">
1186
1471
 
1187
- #<strong>schema_fields</strong>(*field_names) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1472
+ #<strong>schema_fields</strong>(*field_names) &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1188
1473
 
1189
1474
 
1190
1475
 
@@ -1192,14 +1477,34 @@
1192
1477
 
1193
1478
  </h3><div class="docstring">
1194
1479
  <div class="discussion">
1195
-
1196
- <p>DSL method, mass-assigns schema fields</p>
1480
+ <p class="note returns_void">This method returns an undefined value.</p>
1481
+ <p>DSL method, whitelists several fields at once (see <span class='object_link'><a href="#schema_field-instance_method" title="Compony::Components::Form#schema_field (method)">#schema_field</a></span>).</p>
1197
1482
 
1198
1483
 
1199
1484
  </div>
1200
1485
  </div>
1201
1486
  <div class="tags">
1487
+ <p class="tag_title">Parameters:</p>
1488
+ <ul class="param">
1202
1489
 
1490
+ <li>
1491
+
1492
+ <span class='name'>field_names</span>
1493
+
1494
+
1495
+ <span class='type'>(<tt>Array&lt;Symbol,String&gt;</tt>)</span>
1496
+
1497
+
1498
+
1499
+ &mdash;
1500
+ <div class='inline'>
1501
+ <p>The model fields to whitelist.</p>
1502
+ </div>
1503
+
1504
+ </li>
1505
+
1506
+ </ul>
1507
+
1203
1508
 
1204
1509
  </div><table class="source_code">
1205
1510
  <tr>
@@ -1207,12 +1512,12 @@
1207
1512
  <pre class="lines">
1208
1513
 
1209
1514
 
1210
- 230
1211
- 231
1212
- 232</pre>
1515
+ 264
1516
+ 265
1517
+ 266</pre>
1213
1518
  </td>
1214
1519
  <td>
1215
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 230</span>
1520
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 264</span>
1216
1521
 
1217
1522
  <span class='kw'>def</span> <span class='id identifier rubyid_schema_fields'>schema_fields</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_field_names'>field_names</span><span class='rparen'>)</span>
1218
1523
  <span class='id identifier rubyid_field_names'>field_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_field_name'>field_name</span><span class='op'>|</span> <span class='id identifier rubyid_schema_field'>schema_field</span><span class='lparen'>(</span><span class='id identifier rubyid_field_name'>field_name</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
@@ -1225,7 +1530,7 @@
1225
1530
  <div class="method_details ">
1226
1531
  <h3 class="signature " id="schema_line-instance_method">
1227
1532
 
1228
- #<strong>schema_line</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1533
+ #<strong>schema_line</strong> { ... } &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1229
1534
 
1230
1535
 
1231
1536
 
@@ -1233,14 +1538,32 @@
1233
1538
 
1234
1539
  </h3><div class="docstring">
1235
1540
  <div class="discussion">
1236
-
1237
- <p>DSL method, adds a new line to the schema whitelisting a single param inside the schema’s wrapper The block should be something like <code>str? :foo</code> and will run in a Schemacop3 context.</p>
1541
+ <p class="note returns_void">This method returns an undefined value.</p>
1542
+ <p>DSL method, adds a Schemacop3 line whitelisting param(s) inside the schema’s wrapper.</p>
1238
1543
 
1239
1544
 
1240
1545
  </div>
1241
1546
  </div>
1242
1547
  <div class="tags">
1243
1548
 
1549
+ <p class="tag_title">Yields:</p>
1550
+ <ul class="yield">
1551
+
1552
+ <li>
1553
+
1554
+
1555
+ <span class='type'></span>
1556
+
1557
+
1558
+
1559
+
1560
+ <div class='inline'>
1561
+ <p>Runs in a Schemacop3 context, e.g. <code>str? :foo</code>.</p>
1562
+ </div>
1563
+
1564
+ </li>
1565
+
1566
+ </ul>
1244
1567
 
1245
1568
  </div><table class="source_code">
1246
1569
  <tr>
@@ -1248,12 +1571,12 @@
1248
1571
  <pre class="lines">
1249
1572
 
1250
1573
 
1251
- 185
1252
- 186
1253
- 187</pre>
1574
+ 211
1575
+ 212
1576
+ 213</pre>
1254
1577
  </td>
1255
1578
  <td>
1256
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 185</span>
1579
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 211</span>
1257
1580
 
1258
1581
  <span class='kw'>def</span> <span class='id identifier rubyid_schema_line'>schema_line</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1259
1582
  <span class='ivar'>@schema_lines_for_data</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_proc'>proc</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid__data'>_data</span><span class='comma'>,</span> <span class='id identifier rubyid__controller'>_controller</span><span class='op'>|</span> <span class='id identifier rubyid_block'>block</span> <span class='rbrace'>}</span>
@@ -1266,7 +1589,7 @@
1266
1589
  <div class="method_details ">
1267
1590
  <h3 class="signature " id="schema_pw_field-instance_method">
1268
1591
 
1269
- #<strong>schema_pw_field</strong>(field_name) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1592
+ #<strong>schema_pw_field</strong>(field_name) &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1270
1593
 
1271
1594
 
1272
1595
 
@@ -1274,14 +1597,34 @@
1274
1597
 
1275
1598
  </h3><div class="docstring">
1276
1599
  <div class="discussion">
1277
-
1278
- <p>DSL method, adds a new password field to the schema whitelisting This checks for the permission :set_password and auto-generates the correct schema line for the field.</p>
1600
+ <p class="note returns_void">This method returns an undefined value.</p>
1601
+ <p>DSL method, whitelists a password param in the schema (checks the <code>:set_password</code> permission).</p>
1279
1602
 
1280
1603
 
1281
1604
  </div>
1282
1605
  </div>
1283
1606
  <div class="tags">
1607
+ <p class="tag_title">Parameters:</p>
1608
+ <ul class="param">
1609
+
1610
+ <li>
1611
+
1612
+ <span class='name'>field_name</span>
1613
+
1614
+
1615
+ <span class='type'>(<tt>Symbol</tt>, <tt>String</tt>)</span>
1616
+
1617
+
1618
+
1619
+ &mdash;
1620
+ <div class='inline'>
1621
+ <p>The password field name.</p>
1622
+ </div>
1623
+
1624
+ </li>
1284
1625
 
1626
+ </ul>
1627
+
1285
1628
 
1286
1629
  </div><table class="source_code">
1287
1630
  <tr>
@@ -1289,23 +1632,23 @@
1289
1632
  <pre class="lines">
1290
1633
 
1291
1634
 
1292
- 214
1293
- 215
1294
- 216
1295
- 217
1296
- 218
1297
- 219
1298
- 220
1299
- 221
1300
- 222
1301
- 223
1302
- 224
1303
- 225
1304
- 226
1305
- 227</pre>
1635
+ 245
1636
+ 246
1637
+ 247
1638
+ 248
1639
+ 249
1640
+ 250
1641
+ 251
1642
+ 252
1643
+ 253
1644
+ 254
1645
+ 255
1646
+ 256
1647
+ 257
1648
+ 258</pre>
1306
1649
  </td>
1307
1650
  <td>
1308
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 214</span>
1651
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 245</span>
1309
1652
 
1310
1653
  <span class='kw'>def</span> <span class='id identifier rubyid_schema_pw_field'>schema_pw_field</span><span class='lparen'>(</span><span class='id identifier rubyid_field_name'>field_name</span><span class='rparen'>)</span>
1311
1654
  <span class='comment'># This runs upon component setup.
@@ -1352,17 +1695,17 @@
1352
1695
  <pre class="lines">
1353
1696
 
1354
1697
 
1355
- 62
1356
- 63
1357
- 64
1358
- 65
1359
- 66
1360
- 67
1361
1698
  68
1362
- 69</pre>
1699
+ 69
1700
+ 70
1701
+ 71
1702
+ 72
1703
+ 73
1704
+ 74
1705
+ 75</pre>
1363
1706
  </td>
1364
1707
  <td>
1365
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 62</span>
1708
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 68</span>
1366
1709
 
1367
1710
  <span class='kw'>def</span> <span class='id identifier rubyid_schema_wrapper_key_for'>schema_wrapper_key_for</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
1368
1711
  <span class='kw'>if</span> <span class='ivar'>@schema_wrapper_key</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
@@ -1380,7 +1723,7 @@
1380
1723
  <div class="method_details ">
1381
1724
  <h3 class="signature " id="skip_autofocus-instance_method">
1382
1725
 
1383
- #<strong>skip_autofocus</strong> &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
1726
+ #<strong>skip_autofocus</strong> &#x21d2; <tt>void</tt> <span class="extras">(protected)</span>
1384
1727
 
1385
1728
 
1386
1729
 
@@ -1388,8 +1731,8 @@
1388
1731
 
1389
1732
  </h3><div class="docstring">
1390
1733
  <div class="discussion">
1391
-
1392
- <p>DSL method, skips adding autofocus to the first field</p>
1734
+ <p class="note returns_void">This method returns an undefined value.</p>
1735
+ <p>DSL method, skips adding autofocus to the first field.</p>
1393
1736
 
1394
1737
 
1395
1738
  </div>
@@ -1403,12 +1746,12 @@
1403
1746
  <pre class="lines">
1404
1747
 
1405
1748
 
1406
- 245
1407
- 246
1408
- 247</pre>
1749
+ 285
1750
+ 286
1751
+ 287</pre>
1409
1752
  </td>
1410
1753
  <td>
1411
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 245</span>
1754
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 285</span>
1412
1755
 
1413
1756
  <span class='kw'>def</span> <span class='id identifier rubyid_skip_autofocus'>skip_autofocus</span>
1414
1757
  <span class='ivar'>@skip_autofocus</span> <span class='op'>=</span> <span class='kw'>true</span>
@@ -1452,17 +1795,17 @@
1452
1795
  <pre class="lines">
1453
1796
 
1454
1797
 
1455
- 91
1456
- 92
1457
- 93
1458
- 94
1459
- 95
1460
- 96
1461
1798
  97
1462
- 98</pre>
1799
+ 98
1800
+ 99
1801
+ 100
1802
+ 101
1803
+ 102
1804
+ 103
1805
+ 104</pre>
1463
1806
  </td>
1464
1807
  <td>
1465
- <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 91</span>
1808
+ <pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 97</span>
1466
1809
 
1467
1810
  <span class='kw'>def</span> <span class='id identifier rubyid_with_simpleform'>with_simpleform</span><span class='lparen'>(</span><span class='id identifier rubyid_simpleform'>simpleform</span><span class='comma'>,</span> <span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
1468
1811
  <span class='ivar'>@simpleform</span> <span class='op'>=</span> <span class='id identifier rubyid_simpleform'>simpleform</span>
@@ -1482,7 +1825,7 @@
1482
1825
  </div>
1483
1826
 
1484
1827
  <div id="footer">
1485
- Generated on Fri May 15 10:29:33 2026 by
1828
+ Generated on Mon May 18 13:55:35 2026 by
1486
1829
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1487
1830
  0.9.34 (ruby-3.3.5).
1488
1831
  </div>