compony 0.5.1 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +33 -0
- data/VERSION +1 -1
- data/compony.gemspec +4 -4
- data/config/routes.rb +9 -6
- data/doc/ComponentGenerator.html +3 -3
- data/doc/Components.html +3 -3
- data/doc/ComponentsGenerator.html +3 -3
- data/doc/Compony/Component.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Labelling.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +40 -28
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone.html +3 -3
- data/doc/Compony/ComponentMixins/Default.html +3 -3
- data/doc/Compony/ComponentMixins/Resourceful.html +3 -3
- data/doc/Compony/ComponentMixins.html +3 -3
- data/doc/Compony/Components/Button.html +11 -7
- data/doc/Compony/Components/Destroy.html +3 -3
- data/doc/Compony/Components/Edit.html +3 -3
- data/doc/Compony/Components/Form.html +148 -77
- data/doc/Compony/Components/New.html +3 -3
- data/doc/Compony/Components/WithForm.html +3 -3
- data/doc/Compony/Components.html +3 -3
- data/doc/Compony/ControllerMixin.html +3 -3
- data/doc/Compony/Engine.html +3 -3
- data/doc/Compony/MethodAccessibleHash.html +3 -3
- data/doc/Compony/ModelFields/Anchormodel.html +3 -3
- data/doc/Compony/ModelFields/Association.html +4 -4
- data/doc/Compony/ModelFields/Attachment.html +3 -3
- data/doc/Compony/ModelFields/Base.html +3 -3
- data/doc/Compony/ModelFields/Boolean.html +3 -3
- data/doc/Compony/ModelFields/Color.html +3 -3
- data/doc/Compony/ModelFields/Currency.html +3 -3
- data/doc/Compony/ModelFields/Date.html +3 -3
- data/doc/Compony/ModelFields/Datetime.html +3 -3
- data/doc/Compony/ModelFields/Decimal.html +3 -3
- data/doc/Compony/ModelFields/Email.html +3 -3
- data/doc/Compony/ModelFields/Float.html +3 -3
- data/doc/Compony/ModelFields/Integer.html +3 -3
- data/doc/Compony/ModelFields/Percentage.html +3 -3
- data/doc/Compony/ModelFields/Phone.html +3 -3
- data/doc/Compony/ModelFields/RichText.html +3 -3
- data/doc/Compony/ModelFields/String.html +3 -3
- data/doc/Compony/ModelFields/Text.html +3 -3
- data/doc/Compony/ModelFields/Time.html +3 -3
- data/doc/Compony/ModelFields/Url.html +3 -3
- data/doc/Compony/ModelFields.html +3 -3
- data/doc/Compony/ModelMixin.html +3 -3
- data/doc/Compony/NaturalOrdering.html +3 -3
- data/doc/Compony/RequestContext.html +3 -3
- data/doc/Compony/Version.html +3 -3
- data/doc/Compony/ViewHelpers.html +32 -14
- data/doc/Compony.html +4 -4
- data/doc/ComponyController.html +3 -3
- data/doc/_index.html +4 -4
- data/doc/class_list.html +6 -3
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +6 -0
- data/doc/file.README.html +36 -3
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +36 -3
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +152 -141
- data/doc/top-level-namespace.html +3 -3
- data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +7 -1
- data/lib/compony/components/button.rb +5 -3
- data/lib/compony/components/form.rb +9 -1
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/view_helpers.rb +12 -4
- data/lib/compony.rb +1 -1
- metadata +3 -3
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Button
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -160,7 +160,7 @@
|
|
160
160
|
<li class="public ">
|
161
161
|
<span class="summary_signature">
|
162
162
|
|
163
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(label: nil, path: nil, method: nil, type: nil, enabled: nil, visible: nil, title: nil) ⇒ Button </a>
|
163
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(label: nil, path: nil, method: nil, type: nil, enabled: nil, visible: nil, title: nil, button_params: nil, value: nil) ⇒ Button </a>
|
164
164
|
|
165
165
|
|
166
166
|
|
@@ -203,7 +203,7 @@
|
|
203
203
|
<div class="method_details first">
|
204
204
|
<h3 class="signature first" id="initialize-instance_method">
|
205
205
|
|
206
|
-
#<strong>initialize</strong>(label: nil, path: nil, method: nil, type: nil, enabled: nil, visible: nil, title: nil) ⇒ <tt><span class='object_link'><a href="" title="Compony::Components::Button (class)">Button</a></span></tt>
|
206
|
+
#<strong>initialize</strong>(label: nil, path: nil, method: nil, type: nil, enabled: nil, visible: nil, title: nil, button_params: nil, value: nil) ⇒ <tt><span class='object_link'><a href="" title="Compony::Components::Button (class)">Button</a></span></tt>
|
207
207
|
|
208
208
|
|
209
209
|
|
@@ -246,12 +246,14 @@
|
|
246
246
|
27
|
247
247
|
28
|
248
248
|
29
|
249
|
-
30
|
249
|
+
30
|
250
|
+
31
|
251
|
+
32</pre>
|
250
252
|
</td>
|
251
253
|
<td>
|
252
254
|
<pre class="code"><span class="info file"># File 'lib/compony/components/button.rb', line 10</span>
|
253
255
|
|
254
|
-
<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'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>method:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>enabled:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>title:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='rparen'>)</span>
|
256
|
+
<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'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>method:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>enabled:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>title:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>button_params:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>value:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='rparen'>)</span>
|
255
257
|
<span class='ivar'>@label</span> <span class='op'>=</span> <span class='id identifier rubyid_label'>label</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_button_defaults'><span class='object_link'><a href="../../Compony.html#button_defaults-class_method" title="Compony.button_defaults (method)">button_defaults</a></span></span><span class='lbracket'>[</span><span class='symbol'>:label</span><span class='rbracket'>]</span>
|
256
258
|
<span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span><span class='op'>&.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_button_defaults'><span class='object_link'><a href="../../Compony.html#button_defaults-class_method" title="Compony.button_defaults (method)">button_defaults</a></span></span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='symbol'>:button</span>
|
257
259
|
<span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_button_defaults'><span class='object_link'><a href="../../Compony.html#button_defaults-class_method" title="Compony.button_defaults (method)">button_defaults</a></span></span><span class='lbracket'>[</span><span class='symbol'>:path</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>javascript:void(0)</span><span class='tstring_end'>'</span></span>
|
@@ -267,6 +269,8 @@
|
|
267
269
|
<span class='ivar'>@visible</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_button_defaults'><span class='object_link'><a href="../../Compony.html#button_defaults-class_method" title="Compony.button_defaults (method)">button_defaults</a></span></span><span class='lbracket'>[</span><span class='symbol'>:visible</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='ivar'>@visible</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
268
270
|
<span class='ivar'>@visible</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='ivar'>@visible</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
269
271
|
<span class='ivar'>@title</span> <span class='op'>=</span> <span class='id identifier rubyid_title'>title</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_button_defaults'><span class='object_link'><a href="../../Compony.html#button_defaults-class_method" title="Compony.button_defaults (method)">button_defaults</a></span></span><span class='lbracket'>[</span><span class='symbol'>:title</span><span class='rbracket'>]</span>
|
272
|
+
<span class='ivar'>@button_params</span> <span class='op'>=</span> <span class='id identifier rubyid_button_params'>button_params</span>
|
273
|
+
<span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
270
274
|
|
271
275
|
<span class='id identifier rubyid_fail'>fail</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unsupported button type </span><span class='embexpr_beg'>#{</span><span class='ivar'>@type</span><span class='embexpr_end'>}</span><span class='tstring_content'>, use on of: </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="#SUPPORTED_TYPES-constant" title="Compony::Components::Button::SUPPORTED_TYPES (constant)">SUPPORTED_TYPES</a></span></span><span class='period'>.</span><span class='id identifier rubyid_inspect'><span class='object_link'><a href="../Component.html#inspect-instance_method" title="Compony::Component#inspect (method)">inspect</a></span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="#SUPPORTED_TYPES-constant" title="Compony::Components::Button::SUPPORTED_TYPES (constant)">SUPPORTED_TYPES</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@type</span><span class='rparen'>)</span>
|
272
276
|
|
@@ -283,9 +287,9 @@
|
|
283
287
|
</div>
|
284
288
|
|
285
289
|
<div id="footer">
|
286
|
-
Generated on
|
290
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
287
291
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
288
|
-
0.9.
|
292
|
+
0.9.37 (ruby-3.3.5).
|
289
293
|
</div>
|
290
294
|
|
291
295
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Destroy
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -374,9 +374,9 @@
|
|
374
374
|
</div>
|
375
375
|
|
376
376
|
<div id="footer">
|
377
|
-
Generated on
|
377
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
378
378
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
379
|
-
0.9.
|
379
|
+
0.9.37 (ruby-3.3.5).
|
380
380
|
</div>
|
381
381
|
|
382
382
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Edit
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -452,9 +452,9 @@
|
|
452
452
|
</div>
|
453
453
|
|
454
454
|
<div id="footer">
|
455
|
-
Generated on
|
455
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
456
456
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
457
|
-
0.9.
|
457
|
+
0.9.37 (ruby-3.3.5).
|
458
458
|
</div>
|
459
459
|
|
460
460
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Form
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -153,6 +153,30 @@
|
|
153
153
|
<p>Quick access for wrapping collections in Rails compatible format.</p>
|
154
154
|
</div></span>
|
155
155
|
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#disable!-instance_method" title="#disable! (instance method)">#<strong>disable!</strong> ⇒ Object </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
<span class="summary_desc"><div class='inline'>
|
177
|
+
<p>DSL method, disables all inputs.</p>
|
178
|
+
</div></span>
|
179
|
+
|
156
180
|
</li>
|
157
181
|
|
158
182
|
|
@@ -231,7 +255,7 @@
|
|
231
255
|
<li class="public ">
|
232
256
|
<span class="summary_signature">
|
233
257
|
|
234
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args, cancancan_action: :missing, **kwargs) ⇒ Form </a>
|
258
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args, cancancan_action: :missing, disabled: false, **kwargs) ⇒ Form </a>
|
235
259
|
|
236
260
|
|
237
261
|
|
@@ -514,7 +538,7 @@
|
|
514
538
|
<div class="method_details first">
|
515
539
|
<h3 class="signature first" id="initialize-instance_method">
|
516
540
|
|
517
|
-
#<strong>initialize</strong>(*args, cancancan_action: :missing, **kwargs) ⇒ <tt><span class='object_link'><a href="" title="Compony::Components::Form (class)">Form</a></span></tt>
|
541
|
+
#<strong>initialize</strong>(*args, cancancan_action: :missing, disabled: false, **kwargs) ⇒ <tt><span class='object_link'><a href="" title="Compony::Components::Form (class)">Form</a></span></tt>
|
518
542
|
|
519
543
|
|
520
544
|
|
@@ -541,14 +565,16 @@
|
|
541
565
|
7
|
542
566
|
8
|
543
567
|
9
|
544
|
-
10
|
568
|
+
10
|
569
|
+
11</pre>
|
545
570
|
</td>
|
546
571
|
<td>
|
547
572
|
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 6</span>
|
548
573
|
|
549
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='label'>cancancan_action:</span> <span class='symbol'>:missing</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
574
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='label'>cancancan_action:</span> <span class='symbol'>:missing</span><span class='comma'>,</span> <span class='label'>disabled:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
550
575
|
<span class='ivar'>@schema_lines_for_data</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='comment'># Array of procs taking data returning a Schemacop proc
|
551
576
|
</span> <span class='ivar'>@cancancan_action</span> <span class='op'>=</span> <span class='id identifier rubyid_cancancan_action'>cancancan_action</span>
|
577
|
+
<span class='ivar'>@form_disabled</span> <span class='op'>=</span> <span class='id identifier rubyid_disabled'>disabled</span>
|
552
578
|
<span class='kw'>super</span>
|
553
579
|
<span class='kw'>end</span></pre>
|
554
580
|
</td>
|
@@ -589,12 +615,12 @@
|
|
589
615
|
<pre class="lines">
|
590
616
|
|
591
617
|
|
592
|
-
|
593
|
-
|
594
|
-
|
618
|
+
157
|
619
|
+
158
|
620
|
+
159</pre>
|
595
621
|
</td>
|
596
622
|
<td>
|
597
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
623
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 157</span>
|
598
624
|
|
599
625
|
<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>
|
600
626
|
<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>
|
@@ -602,6 +628,47 @@
|
|
602
628
|
</td>
|
603
629
|
</tr>
|
604
630
|
</table>
|
631
|
+
</div>
|
632
|
+
|
633
|
+
<div class="method_details ">
|
634
|
+
<h3 class="signature " id="disable!-instance_method">
|
635
|
+
|
636
|
+
#<strong>disable!</strong> ⇒ <tt>Object</tt>
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
</h3><div class="docstring">
|
643
|
+
<div class="discussion">
|
644
|
+
|
645
|
+
<p>DSL method, disables all inputs</p>
|
646
|
+
|
647
|
+
|
648
|
+
</div>
|
649
|
+
</div>
|
650
|
+
<div class="tags">
|
651
|
+
|
652
|
+
|
653
|
+
</div><table class="source_code">
|
654
|
+
<tr>
|
655
|
+
<td>
|
656
|
+
<pre class="lines">
|
657
|
+
|
658
|
+
|
659
|
+
162
|
660
|
+
163
|
661
|
+
164</pre>
|
662
|
+
</td>
|
663
|
+
<td>
|
664
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 162</span>
|
665
|
+
|
666
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_disable!'>disable!</span>
|
667
|
+
<span class='ivar'>@form_disabled</span> <span class='op'>=</span> <span class='kw'>true</span>
|
668
|
+
<span class='kw'>end</span></pre>
|
669
|
+
</td>
|
670
|
+
</tr>
|
671
|
+
</table>
|
605
672
|
</div>
|
606
673
|
|
607
674
|
<div class="method_details ">
|
@@ -630,13 +697,13 @@
|
|
630
697
|
<pre class="lines">
|
631
698
|
|
632
699
|
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
700
|
+
151
|
701
|
+
152
|
702
|
+
153
|
703
|
+
154</pre>
|
637
704
|
</td>
|
638
705
|
<td>
|
639
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
706
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 151</span>
|
640
707
|
|
641
708
|
<span class='kw'>def</span> <span class='id identifier rubyid_f'>f</span>
|
642
709
|
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</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'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@simpleform</span>
|
@@ -673,7 +740,6 @@
|
|
673
740
|
<pre class="lines">
|
674
741
|
|
675
742
|
|
676
|
-
97
|
677
743
|
98
|
678
744
|
99
|
679
745
|
100
|
@@ -698,15 +764,20 @@
|
|
698
764
|
119
|
699
765
|
120
|
700
766
|
121
|
701
|
-
122
|
767
|
+
122
|
768
|
+
123
|
769
|
+
124
|
770
|
+
125</pre>
|
702
771
|
</td>
|
703
772
|
<td>
|
704
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
773
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 98</span>
|
705
774
|
|
706
775
|
<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='op'>**</span><span class='id identifier rubyid_input_opts'>input_opts</span><span class='rparen'>)</span>
|
707
776
|
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</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'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@simpleform</span>
|
708
777
|
<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>
|
709
778
|
|
779
|
+
<span class='id identifier rubyid_input_opts'>input_opts</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='label'>disabled:</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@form_disabled</span>
|
780
|
+
|
710
781
|
<span class='comment'># Check per-field authorization
|
711
782
|
</span> <span class='kw'>if</span> <span class='ivar'>@cancancan_action</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='ivar'>@controller</span><span class='period'>.</span><span class='id identifier rubyid_current_ability'>current_ability</span><span class='period'>.</span><span class='id identifier rubyid_permitted_attributes'>permitted_attributes</span><span class='lparen'>(</span><span class='ivar'>@cancancan_action</span><span class='comma'>,</span> <span class='ivar'>@simpleform</span><span class='period'>.</span><span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_exclude?'>exclude?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
712
783
|
<span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span> <span class='kw'>do</span>
|
@@ -760,13 +831,13 @@
|
|
760
831
|
<pre class="lines">
|
761
832
|
|
762
833
|
|
763
|
-
51
|
764
834
|
52
|
765
835
|
53
|
766
|
-
54
|
836
|
+
54
|
837
|
+
55</pre>
|
767
838
|
</td>
|
768
839
|
<td>
|
769
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
840
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 52</span>
|
770
841
|
|
771
842
|
<span class='kw'>def</span> <span class='id identifier rubyid_form_fields'>form_fields</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
772
843
|
<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>
|
@@ -803,9 +874,6 @@
|
|
803
874
|
<pre class="lines">
|
804
875
|
|
805
876
|
|
806
|
-
127
|
807
|
-
128
|
808
|
-
129
|
809
877
|
130
|
810
878
|
131
|
811
879
|
132
|
@@ -820,10 +888,13 @@
|
|
820
888
|
141
|
821
889
|
142
|
822
890
|
143
|
823
|
-
144
|
891
|
+
144
|
892
|
+
145
|
893
|
+
146
|
894
|
+
147</pre>
|
824
895
|
</td>
|
825
896
|
<td>
|
826
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
897
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 130</span>
|
827
898
|
|
828
899
|
<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>
|
829
900
|
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</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'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@simpleform</span>
|
@@ -874,17 +945,17 @@
|
|
874
945
|
<pre class="lines">
|
875
946
|
|
876
947
|
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
948
|
+
215
|
949
|
+
216
|
950
|
+
217
|
951
|
+
218
|
952
|
+
219
|
953
|
+
220
|
954
|
+
221
|
955
|
+
222</pre>
|
885
956
|
</td>
|
886
957
|
<td>
|
887
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
958
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 215</span>
|
888
959
|
|
889
960
|
<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'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
890
961
|
<span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
@@ -925,7 +996,6 @@
|
|
925
996
|
<pre class="lines">
|
926
997
|
|
927
998
|
|
928
|
-
67
|
929
999
|
68
|
930
1000
|
69
|
931
1001
|
70
|
@@ -938,10 +1008,11 @@
|
|
938
1008
|
77
|
939
1009
|
78
|
940
1010
|
79
|
941
|
-
80
|
1011
|
+
80
|
1012
|
+
81</pre>
|
942
1013
|
</td>
|
943
1014
|
<td>
|
944
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1015
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 68</span>
|
945
1016
|
|
946
1017
|
<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>
|
947
1018
|
<span class='kw'>if</span> <span class='ivar'>@schema_block</span>
|
@@ -988,24 +1059,24 @@
|
|
988
1059
|
<pre class="lines">
|
989
1060
|
|
990
1061
|
|
991
|
-
168
|
992
|
-
169
|
993
|
-
170
|
994
|
-
171
|
995
|
-
172
|
996
|
-
173
|
997
|
-
174
|
998
|
-
175
|
999
1062
|
176
|
1000
1063
|
177
|
1001
1064
|
178
|
1002
1065
|
179
|
1003
1066
|
180
|
1004
1067
|
181
|
1005
|
-
182
|
1068
|
+
182
|
1069
|
+
183
|
1070
|
+
184
|
1071
|
+
185
|
1072
|
+
186
|
1073
|
+
187
|
1074
|
+
188
|
1075
|
+
189
|
1076
|
+
190</pre>
|
1006
1077
|
</td>
|
1007
1078
|
<td>
|
1008
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1079
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 176</span>
|
1009
1080
|
|
1010
1081
|
<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='rparen'>)</span>
|
1011
1082
|
<span class='comment'># This runs upon component setup.
|
@@ -1053,12 +1124,12 @@
|
|
1053
1124
|
<pre class="lines">
|
1054
1125
|
|
1055
1126
|
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1127
|
+
210
|
1128
|
+
211
|
1129
|
+
212</pre>
|
1059
1130
|
</td>
|
1060
1131
|
<td>
|
1061
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1132
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 210</span>
|
1062
1133
|
|
1063
1134
|
<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>
|
1064
1135
|
<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>
|
@@ -1094,12 +1165,12 @@
|
|
1094
1165
|
<pre class="lines">
|
1095
1166
|
|
1096
1167
|
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1168
|
+
170
|
1169
|
+
171
|
1170
|
+
172</pre>
|
1100
1171
|
</td>
|
1101
1172
|
<td>
|
1102
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1173
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 170</span>
|
1103
1174
|
|
1104
1175
|
<span class='kw'>def</span> <span class='id identifier rubyid_schema_line'>schema_line</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1105
1176
|
<span class='ivar'>@schema_lines_for_data</span> <span class='op'><<</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>
|
@@ -1135,23 +1206,23 @@
|
|
1135
1206
|
<pre class="lines">
|
1136
1207
|
|
1137
1208
|
|
1138
|
-
186
|
1139
|
-
187
|
1140
|
-
188
|
1141
|
-
189
|
1142
|
-
190
|
1143
|
-
191
|
1144
|
-
192
|
1145
|
-
193
|
1146
1209
|
194
|
1147
1210
|
195
|
1148
1211
|
196
|
1149
1212
|
197
|
1150
1213
|
198
|
1151
|
-
199
|
1214
|
+
199
|
1215
|
+
200
|
1216
|
+
201
|
1217
|
+
202
|
1218
|
+
203
|
1219
|
+
204
|
1220
|
+
205
|
1221
|
+
206
|
1222
|
+
207</pre>
|
1152
1223
|
</td>
|
1153
1224
|
<td>
|
1154
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1225
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 194</span>
|
1155
1226
|
|
1156
1227
|
<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>
|
1157
1228
|
<span class='comment'># This runs upon component setup.
|
@@ -1198,17 +1269,17 @@
|
|
1198
1269
|
<pre class="lines">
|
1199
1270
|
|
1200
1271
|
|
1201
|
-
57
|
1202
1272
|
58
|
1203
1273
|
59
|
1204
1274
|
60
|
1205
1275
|
61
|
1206
1276
|
62
|
1207
1277
|
63
|
1208
|
-
64
|
1278
|
+
64
|
1279
|
+
65</pre>
|
1209
1280
|
</td>
|
1210
1281
|
<td>
|
1211
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1282
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 58</span>
|
1212
1283
|
|
1213
1284
|
<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>
|
1214
1285
|
<span class='kw'>if</span> <span class='ivar'>@schema_wrapper_key</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
@@ -1249,12 +1320,12 @@
|
|
1249
1320
|
<pre class="lines">
|
1250
1321
|
|
1251
1322
|
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1323
|
+
225
|
1324
|
+
226
|
1325
|
+
227</pre>
|
1255
1326
|
</td>
|
1256
1327
|
<td>
|
1257
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1328
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 225</span>
|
1258
1329
|
|
1259
1330
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_autofocus'>skip_autofocus</span>
|
1260
1331
|
<span class='ivar'>@skip_autofocus</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -1298,17 +1369,17 @@
|
|
1298
1369
|
<pre class="lines">
|
1299
1370
|
|
1300
1371
|
|
1301
|
-
86
|
1302
1372
|
87
|
1303
1373
|
88
|
1304
1374
|
89
|
1305
1375
|
90
|
1306
1376
|
91
|
1307
1377
|
92
|
1308
|
-
93
|
1378
|
+
93
|
1379
|
+
94</pre>
|
1309
1380
|
</td>
|
1310
1381
|
<td>
|
1311
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
1382
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 87</span>
|
1312
1383
|
|
1313
1384
|
<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>
|
1314
1385
|
<span class='ivar'>@simpleform</span> <span class='op'>=</span> <span class='id identifier rubyid_simpleform'>simpleform</span>
|
@@ -1328,9 +1399,9 @@
|
|
1328
1399
|
</div>
|
1329
1400
|
|
1330
1401
|
<div id="footer">
|
1331
|
-
Generated on
|
1402
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
1332
1403
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1333
|
-
0.9.
|
1404
|
+
0.9.37 (ruby-3.3.5).
|
1334
1405
|
</div>
|
1335
1406
|
|
1336
1407
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::New
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -452,9 +452,9 @@
|
|
452
452
|
</div>
|
453
453
|
|
454
454
|
<div id="footer">
|
455
|
-
Generated on
|
455
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
456
456
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
457
|
-
0.9.
|
457
|
+
0.9.37 (ruby-3.3.5).
|
458
458
|
</div>
|
459
459
|
|
460
460
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::WithForm
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -593,9 +593,9 @@
|
|
593
593
|
</div>
|
594
594
|
|
595
595
|
<div id="footer">
|
596
|
-
Generated on
|
596
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
597
597
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
598
|
-
0.9.
|
598
|
+
0.9.37 (ruby-3.3.5).
|
599
599
|
</div>
|
600
600
|
|
601
601
|
</div>
|
data/doc/Compony/Components.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Compony::Components
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Fri Dec 20 13:46:33 2024 by
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.9.
|
121
|
+
0.9.37 (ruby-3.3.5).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</div>
|