compony 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/VERSION +1 -1
- data/compony.gemspec +3 -3
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +247 -156
- data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Button.html +2 -2
- data/doc/Compony/Components/Destroy.html +2 -2
- data/doc/Compony/Components/Edit.html +2 -2
- data/doc/Compony/Components/Form.html +2 -2
- data/doc/Compony/Components/Index.html +2 -2
- data/doc/Compony/Components/List.html +2 -2
- data/doc/Compony/Components/New.html +2 -2
- data/doc/Compony/Components/Show.html +2 -2
- data/doc/Compony/Components/WithForm.html +19 -21
- data/doc/Compony/Components.html +1 -1
- data/doc/Compony/ControllerMixin.html +1 -1
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +1 -1
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +1 -1
- data/doc/Compony/ModelFields/Boolean.html +1 -1
- data/doc/Compony/ModelFields/Color.html +1 -1
- data/doc/Compony/ModelFields/Currency.html +1 -1
- data/doc/Compony/ModelFields/Date.html +1 -1
- data/doc/Compony/ModelFields/Datetime.html +1 -1
- data/doc/Compony/ModelFields/Decimal.html +1 -1
- data/doc/Compony/ModelFields/Email.html +1 -1
- data/doc/Compony/ModelFields/Float.html +1 -1
- data/doc/Compony/ModelFields/Integer.html +1 -1
- data/doc/Compony/ModelFields/Percentage.html +1 -1
- data/doc/Compony/ModelFields/Phone.html +1 -1
- data/doc/Compony/ModelFields/RichText.html +1 -1
- data/doc/Compony/ModelFields/String.html +1 -1
- data/doc/Compony/ModelFields/Text.html +1 -1
- data/doc/Compony/ModelFields/Time.html +1 -1
- data/doc/Compony/ModelFields/Url.html +1 -1
- data/doc/Compony/ModelFields.html +1 -1
- data/doc/Compony/ModelMixin.html +1 -1
- data/doc/Compony/NaturalOrdering.html +1 -1
- data/doc/Compony/RequestContext.html +1 -1
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +1 -1
- data/doc/Compony.html +44 -42
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +7 -1
- data/doc/index.html +7 -1
- data/doc/method_list.html +109 -101
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/component.rb +30 -8
- data/lib/compony/components/with_form.rb +1 -2
- data/lib/compony.rb +9 -8
- metadata +2 -2
|
@@ -443,7 +443,7 @@ instance_of_a_hash.roo --> nil
|
|
|
443
443
|
</div>
|
|
444
444
|
|
|
445
445
|
<div id="footer">
|
|
446
|
-
Generated on
|
|
446
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
447
447
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
448
448
|
0.9.34 (ruby-3.3.5).
|
|
449
449
|
</div>
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
</div>
|
|
510
510
|
|
|
511
511
|
<div id="footer">
|
|
512
|
-
Generated on
|
|
512
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
513
513
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
514
514
|
0.9.34 (ruby-3.3.5).
|
|
515
515
|
</div>
|
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
</div>
|
|
604
604
|
|
|
605
605
|
<div id="footer">
|
|
606
|
-
Generated on
|
|
606
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
607
607
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
608
608
|
0.9.34 (ruby-3.3.5).
|
|
609
609
|
</div>
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
</div>
|
|
490
490
|
|
|
491
491
|
<div id="footer">
|
|
492
|
-
Generated on
|
|
492
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
493
493
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
494
494
|
0.9.34 (ruby-3.3.5).
|
|
495
495
|
</div>
|
|
@@ -1186,7 +1186,7 @@
|
|
|
1186
1186
|
</div>
|
|
1187
1187
|
|
|
1188
1188
|
<div id="footer">
|
|
1189
|
-
Generated on
|
|
1189
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
1190
1190
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1191
1191
|
0.9.34 (ruby-3.3.5).
|
|
1192
1192
|
</div>
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
</div>
|
|
355
355
|
|
|
356
356
|
<div id="footer">
|
|
357
|
-
Generated on
|
|
357
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
358
358
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
359
359
|
0.9.34 (ruby-3.3.5).
|
|
360
360
|
</div>
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
</div>
|
|
290
290
|
|
|
291
291
|
<div id="footer">
|
|
292
|
-
Generated on
|
|
292
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
293
293
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
294
294
|
0.9.34 (ruby-3.3.5).
|
|
295
295
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</div>
|
|
231
231
|
|
|
232
232
|
<div id="footer">
|
|
233
|
-
Generated on
|
|
233
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
234
234
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
235
235
|
0.9.34 (ruby-3.3.5).
|
|
236
236
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
</div>
|
|
292
292
|
|
|
293
293
|
<div id="footer">
|
|
294
|
-
Generated on
|
|
294
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
295
295
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
296
296
|
0.9.34 (ruby-3.3.5).
|
|
297
297
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Nov 14 15:08:17 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</div>
|
|
231
231
|
|
|
232
232
|
<div id="footer">
|
|
233
|
-
Generated on
|
|
233
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
234
234
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
235
235
|
0.9.34 (ruby-3.3.5).
|
|
236
236
|
</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on
|
|
119
|
+
Generated on Fri Nov 14 15:08:15 2025 by
|
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.9.34 (ruby-3.3.5).
|
|
122
122
|
</div>
|
data/doc/Compony/ModelMixin.html
CHANGED
|
@@ -514,7 +514,7 @@
|
|
|
514
514
|
</div>
|
|
515
515
|
|
|
516
516
|
<div id="footer">
|
|
517
|
-
Generated on
|
|
517
|
+
Generated on Fri Nov 14 15:08:15 2025 by
|
|
518
518
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
519
519
|
0.9.34 (ruby-3.3.5).
|
|
520
520
|
</div>
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
</div>
|
|
291
291
|
|
|
292
292
|
<div id="footer">
|
|
293
|
-
Generated on
|
|
293
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
294
294
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
295
295
|
0.9.34 (ruby-3.3.5).
|
|
296
296
|
</div>
|
|
@@ -931,7 +931,7 @@
|
|
|
931
931
|
</div>
|
|
932
932
|
|
|
933
933
|
<div id="footer">
|
|
934
|
-
Generated on
|
|
934
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
935
935
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
936
936
|
0.9.34 (ruby-3.3.5).
|
|
937
937
|
</div>
|
data/doc/Compony/Version.html
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
131
|
<div id="footer">
|
|
132
|
-
Generated on
|
|
132
|
+
Generated on Fri Nov 14 15:08:15 2025 by
|
|
133
133
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
134
134
|
0.9.34 (ruby-3.3.5).
|
|
135
135
|
</div>
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
</div>
|
|
480
480
|
|
|
481
481
|
<div id="footer">
|
|
482
|
-
Generated on
|
|
482
|
+
Generated on Fri Nov 14 15:08:15 2025 by
|
|
483
483
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
484
484
|
0.9.34 (ruby-3.3.5).
|
|
485
485
|
</div>
|
data/doc/Compony.html
CHANGED
|
@@ -517,7 +517,7 @@
|
|
|
517
517
|
<li class="public ">
|
|
518
518
|
<span class="summary_signature">
|
|
519
519
|
|
|
520
|
-
<a href="#path-class_method" title="path (class method)">.<strong>path</strong>(
|
|
520
|
+
<a href="#path-class_method" title="path (class method)">.<strong>path</strong>(comp_name_or_cst_or_class, model_or_family_name_or_cst = nil, *args_for_path_helper, standalone_name: nil, **kwargs_for_path_helper) ⇒ Object </a>
|
|
521
521
|
|
|
522
522
|
|
|
523
523
|
|
|
@@ -931,7 +931,6 @@
|
|
|
931
931
|
<pre class="lines">
|
|
932
932
|
|
|
933
933
|
|
|
934
|
-
176
|
|
935
934
|
177
|
|
936
935
|
178
|
|
937
936
|
179
|
|
@@ -966,10 +965,11 @@
|
|
|
966
965
|
208
|
|
967
966
|
209
|
|
968
967
|
210
|
|
969
|
-
211
|
|
968
|
+
211
|
|
969
|
+
212</pre>
|
|
970
970
|
</td>
|
|
971
971
|
<td>
|
|
972
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
972
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 177</span>
|
|
973
973
|
|
|
974
974
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_button'>button</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='comma'>,</span>
|
|
975
975
|
<span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
|
@@ -1159,12 +1159,12 @@
|
|
|
1159
1159
|
<pre class="lines">
|
|
1160
1160
|
|
|
1161
1161
|
|
|
1162
|
-
232
|
|
1163
1162
|
233
|
|
1164
|
-
234
|
|
1163
|
+
234
|
|
1164
|
+
235</pre>
|
|
1165
1165
|
</td>
|
|
1166
1166
|
<td>
|
|
1167
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
1167
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 233</span>
|
|
1168
1168
|
|
|
1169
1169
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_button_defaults'>button_defaults</span>
|
|
1170
1170
|
<span class='const'>RequestStore</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lbracket'>[</span><span class='symbol'>:button_defaults</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
@@ -1236,17 +1236,17 @@
|
|
|
1236
1236
|
<pre class="lines">
|
|
1237
1237
|
|
|
1238
1238
|
|
|
1239
|
-
122
|
|
1240
1239
|
123
|
|
1241
1240
|
124
|
|
1242
1241
|
125
|
|
1243
1242
|
126
|
|
1244
1243
|
127
|
|
1245
1244
|
128
|
|
1246
|
-
129
|
|
1245
|
+
129
|
|
1246
|
+
130</pre>
|
|
1247
1247
|
</td>
|
|
1248
1248
|
<td>
|
|
1249
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
1249
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 123</span>
|
|
1250
1250
|
|
|
1251
1251
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_comp_class_for'>comp_class_for</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst'>comp_name_or_cst</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span>
|
|
1252
1252
|
<span class='id identifier rubyid_family_cst_str'>family_cst_str</span> <span class='op'>=</span> <span class='id identifier rubyid_family_name_for'>family_name_for</span><span class='lparen'>(</span><span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span>
|
|
@@ -1294,14 +1294,14 @@
|
|
|
1294
1294
|
<pre class="lines">
|
|
1295
1295
|
|
|
1296
1296
|
|
|
1297
|
-
133
|
|
1298
1297
|
134
|
|
1299
1298
|
135
|
|
1300
1299
|
136
|
|
1301
|
-
137
|
|
1300
|
+
137
|
|
1301
|
+
138</pre>
|
|
1302
1302
|
</td>
|
|
1303
1303
|
<td>
|
|
1304
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
1304
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 134</span>
|
|
1305
1305
|
|
|
1306
1306
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_comp_class_for!'>comp_class_for!</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst'>comp_name_or_cst</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span>
|
|
1307
1307
|
<span class='id identifier rubyid_comp_class_for'>comp_class_for</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst'>comp_name_or_cst</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span>
|
|
@@ -1541,16 +1541,16 @@
|
|
|
1541
1541
|
<pre class="lines">
|
|
1542
1542
|
|
|
1543
1543
|
|
|
1544
|
-
222
|
|
1545
1544
|
223
|
|
1546
1545
|
224
|
|
1547
1546
|
225
|
|
1548
1547
|
226
|
|
1549
1548
|
227
|
|
1550
|
-
228
|
|
1549
|
+
228
|
|
1550
|
+
229</pre>
|
|
1551
1551
|
</td>
|
|
1552
1552
|
<td>
|
|
1553
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
1553
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 223</span>
|
|
1554
1554
|
|
|
1555
1555
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_family_name_for'>family_name_for</span><span class='lparen'>(</span><span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span>
|
|
1556
1556
|
<span class='kw'>if</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:model_name</span><span class='rparen'>)</span>
|
|
@@ -1610,7 +1610,6 @@
|
|
|
1610
1610
|
<pre class="lines">
|
|
1611
1611
|
|
|
1612
1612
|
|
|
1613
|
-
263
|
|
1614
1613
|
264
|
|
1615
1614
|
265
|
|
1616
1615
|
266
|
|
@@ -1618,10 +1617,11 @@
|
|
|
1618
1617
|
268
|
|
1619
1618
|
269
|
|
1620
1619
|
270
|
|
1621
|
-
271
|
|
1620
|
+
271
|
|
1621
|
+
272</pre>
|
|
1622
1622
|
</td>
|
|
1623
1623
|
<td>
|
|
1624
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
1624
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 264</span>
|
|
1625
1625
|
|
|
1626
1626
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_model_field_class_for'>model_field_class_for</span><span class='lparen'>(</span><span class='id identifier rubyid_constant'>constant</span><span class='rparen'>)</span>
|
|
1627
1627
|
<span class='id identifier rubyid_model_field_namespaces'>model_field_namespaces</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_model_field_namespace'>model_field_namespace</span><span class='op'>|</span>
|
|
@@ -1749,7 +1749,7 @@
|
|
|
1749
1749
|
<div class="method_details ">
|
|
1750
1750
|
<h3 class="signature " id="path-class_method">
|
|
1751
1751
|
|
|
1752
|
-
.<strong>path</strong>(
|
|
1752
|
+
.<strong>path</strong>(comp_name_or_cst_or_class, model_or_family_name_or_cst = nil, *args_for_path_helper, standalone_name: nil, **kwargs_for_path_helper) ⇒ <tt>Object</tt>
|
|
1753
1753
|
|
|
1754
1754
|
|
|
1755
1755
|
|
|
@@ -1769,7 +1769,7 @@
|
|
|
1769
1769
|
|
|
1770
1770
|
<li>
|
|
1771
1771
|
|
|
1772
|
-
<span class='name'>
|
|
1772
|
+
<span class='name'>comp_name_or_cst_or_class</span>
|
|
1773
1773
|
|
|
1774
1774
|
|
|
1775
1775
|
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
|
@@ -1868,19 +1868,21 @@
|
|
|
1868
1868
|
112
|
|
1869
1869
|
113
|
|
1870
1870
|
114
|
|
1871
|
-
115
|
|
1871
|
+
115
|
|
1872
|
+
116</pre>
|
|
1872
1873
|
</td>
|
|
1873
1874
|
<td>
|
|
1874
1875
|
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 107</span>
|
|
1875
1876
|
|
|
1876
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='id identifier
|
|
1877
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args_for_path_helper'>args_for_path_helper</span><span class='comma'>,</span> <span class='label'>standalone_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs_for_path_helper'>kwargs_for_path_helper</span><span class='rparen'>)</span>
|
|
1877
1878
|
<span class='comment'># Extract model if any, to get the ID
|
|
1878
|
-
</span> <span class='id identifier
|
|
1879
|
-
<span class='kw'>
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1879
|
+
</span> <span class='id identifier rubyid_model'>model</span> <span class='op'>=</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:model_name</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
|
1880
|
+
<span class='id identifier rubyid_comp_class'>comp_class</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span> <span class='op'><=</span> <span class='const'><span class='object_link'><a href="" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Compony/Component.html" title="Compony::Component (class)">Component</a></span></span><span class='rparen'>)</span>
|
|
1881
|
+
<span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span>
|
|
1882
|
+
<span class='kw'>else</span>
|
|
1883
|
+
<span class='id identifier rubyid_comp_class_for!'>comp_class_for!</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span>
|
|
1884
|
+
<span class='kw'>end</span>
|
|
1885
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_comp_class'>comp_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='id identifier rubyid_model'>model</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args_for_path_helper'>args_for_path_helper</span><span class='comma'>,</span> <span class='label'>standalone_name:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs_for_path_helper'>kwargs_for_path_helper</span><span class='rparen'>)</span>
|
|
1884
1886
|
<span class='kw'>end</span></pre>
|
|
1885
1887
|
</td>
|
|
1886
1888
|
</tr>
|
|
@@ -1922,12 +1924,12 @@
|
|
|
1922
1924
|
<pre class="lines">
|
|
1923
1925
|
|
|
1924
1926
|
|
|
1925
|
-
144
|
|
1926
1927
|
145
|
|
1927
|
-
146
|
|
1928
|
+
146
|
|
1929
|
+
147</pre>
|
|
1928
1930
|
</td>
|
|
1929
1931
|
<td>
|
|
1930
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
1932
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 145</span>
|
|
1931
1933
|
|
|
1932
1934
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_path_helper_name'>path_helper_name</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span>
|
|
1933
1935
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rails_action_name'>rails_action_name</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>_comp</span><span class='tstring_end'>"</span></span>
|
|
@@ -2024,17 +2026,17 @@
|
|
|
2024
2026
|
<pre class="lines">
|
|
2025
2027
|
|
|
2026
2028
|
|
|
2027
|
-
154
|
|
2028
2029
|
155
|
|
2029
2030
|
156
|
|
2030
2031
|
157
|
|
2031
2032
|
158
|
|
2032
2033
|
159
|
|
2033
2034
|
160
|
|
2034
|
-
161
|
|
2035
|
+
161
|
|
2036
|
+
162</pre>
|
|
2035
2037
|
</td>
|
|
2036
2038
|
<td>
|
|
2037
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
2039
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 155</span>
|
|
2038
2040
|
|
|
2039
2041
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rails_action_name'>rails_action_name</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
2040
2042
|
<span class='kw'>if</span> <span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span> <span class='op'><=</span> <span class='const'><span class='object_link'><a href="" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Compony/Component.html" title="Compony::Component (class)">Component</a></span></span><span class='rparen'>)</span>
|
|
@@ -2075,12 +2077,12 @@
|
|
|
2075
2077
|
<pre class="lines">
|
|
2076
2078
|
|
|
2077
2079
|
|
|
2078
|
-
214
|
|
2079
2080
|
215
|
|
2080
|
-
216
|
|
2081
|
+
216
|
|
2082
|
+
217</pre>
|
|
2081
2083
|
</td>
|
|
2082
2084
|
<td>
|
|
2083
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
2085
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 215</span>
|
|
2084
2086
|
|
|
2085
2087
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_root_comp'>root_comp</span>
|
|
2086
2088
|
<span class='const'>RequestStore</span><span class='period'>.</span><span class='id identifier rubyid_store'>store</span><span class='lbracket'>[</span><span class='symbol'>:compony_root_comp</span><span class='rbracket'>]</span>
|
|
@@ -2152,7 +2154,6 @@
|
|
|
2152
2154
|
<pre class="lines">
|
|
2153
2155
|
|
|
2154
2156
|
|
|
2155
|
-
240
|
|
2156
2157
|
241
|
|
2157
2158
|
242
|
|
2158
2159
|
243
|
|
@@ -2171,10 +2172,11 @@
|
|
|
2171
2172
|
256
|
|
2172
2173
|
257
|
|
2173
2174
|
258
|
|
2174
|
-
259
|
|
2175
|
+
259
|
|
2176
|
+
260</pre>
|
|
2175
2177
|
</td>
|
|
2176
2178
|
<td>
|
|
2177
|
-
<pre class="code"><span class="info file"># File 'lib/compony.rb', line
|
|
2179
|
+
<pre class="code"><span class="info file"># File 'lib/compony.rb', line 241</span>
|
|
2178
2180
|
|
|
2179
2181
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_with_button_defaults'>with_button_defaults</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_keys_to_overwrite'>keys_to_overwrite</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
2180
2182
|
<span class='comment'># Lazy initialize butto_defaults store if it hasn't been yet
|
|
@@ -2206,7 +2208,7 @@
|
|
|
2206
2208
|
</div>
|
|
2207
2209
|
|
|
2208
2210
|
<div id="footer">
|
|
2209
|
-
Generated on
|
|
2211
|
+
Generated on Fri Nov 14 15:08:15 2025 by
|
|
2210
2212
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
2211
2213
|
0.9.34 (ruby-3.3.5).
|
|
2212
2214
|
</div>
|
data/doc/ComponyController.html
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div id="footer">
|
|
117
|
-
Generated on
|
|
117
|
+
Generated on Fri Nov 14 15:08:16 2025 by
|
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
119
119
|
0.9.34 (ruby-3.3.5).
|
|
120
120
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
</div>
|
|
588
588
|
|
|
589
589
|
<div id="footer">
|
|
590
|
-
Generated on
|
|
590
|
+
Generated on Fri Nov 14 15:08:13 2025 by
|
|
591
591
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
592
592
|
0.9.34 (ruby-3.3.5).
|
|
593
593
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -1075,6 +1075,12 @@ The number 8 has the binary form 1000. Enter a number and press ENTER: [8]
|
|
|
1075
1075
|
|
|
1076
1076
|
<p>Note that the generated paths in the example are just for illustration purposes. The paths point to whatever path you configure in the target component’s default standalone config. Also, this example is not how you should generate links to components, as is explained in the next subsection.</p>
|
|
1077
1077
|
|
|
1078
|
+
<h4 id="label-Customizing+path+generation">Customizing path generation</h4>
|
|
1079
|
+
|
|
1080
|
+
<p>By implementing <code>path do ... end</code> inside the <code>setup</code> method of a component, you can override the way paths to that component are generated. Customizing the path generation will affect all mentioned methods mentioned here involving paths, such as <code>Compony.path</code>, <code>compony_link</code>, <code>Compony.button</code>, <code>compony_button</code> etc.</p>
|
|
1081
|
+
|
|
1082
|
+
<p>This is an advanced usage. Refer to the default implementation of <code>Component</code>‘s <code>path_block</code> to see an exmple.</p>
|
|
1083
|
+
|
|
1078
1084
|
<h3 id="label-Generating+a+link+to+a+component">Generating a link to a component</h3>
|
|
1079
1085
|
|
|
1080
1086
|
<p>In order to allow a user to visit another component, don’t implement your links and buttons manually. Instead, use Compony’s links and buttons, as those extract information from the target component, avoiding redundant code and making refactoring much easier.</p>
|
|
@@ -1779,7 +1785,7 @@ my_button = Compony.button(:index, :users, enabled: -> { |controller| control
|
|
|
1779
1785
|
</div></div>
|
|
1780
1786
|
|
|
1781
1787
|
<div id="footer">
|
|
1782
|
-
Generated on
|
|
1788
|
+
Generated on Fri Nov 14 15:08:15 2025 by
|
|
1783
1789
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1784
1790
|
0.9.34 (ruby-3.3.5).
|
|
1785
1791
|
</div>
|