compony 0.11.14 → 0.12.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 +30 -0
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/compony.gemspec +3 -3
- data/config/locales/de.yml +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +1 -1
- 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/Buttons/CssButton.html +12 -1
- data/doc/Compony/Components/Buttons/Link.html +239 -16
- data/doc/Compony/Components/Buttons.html +1 -1
- data/doc/Compony/Components/Destroy.html +1 -1
- data/doc/Compony/Components/Edit.html +1 -1
- data/doc/Compony/Components/Form.html +83 -83
- data/doc/Compony/Components/Index.html +1 -1
- data/doc/Compony/Components/List.html +1 -1
- data/doc/Compony/Components/New.html +1 -1
- data/doc/Compony/Components/Show.html +1 -1
- data/doc/Compony/Components/WithForm.html +1 -1
- data/doc/Compony/Components.html +1 -1
- data/doc/Compony/ControllerMixin.html +1 -1
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/Intent.html +1 -1
- data/doc/Compony/ManageIntentsDsl.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 +13 -11
- 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/VirtualModel.html +1 -1
- data/doc/Compony.html +1 -1
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.CHANGELOG.html +32 -9
- data/doc/file.README.html +1 -1
- data/doc/file.basic_component.html +1 -1
- data/doc/file.cookbook.html +1 -1
- data/doc/file.destroy.html +1 -1
- data/doc/file.dsl_reference.html +1 -1
- data/doc/file.edit.html +1 -1
- data/doc/file.example.html +1 -1
- data/doc/file.example_advanced.html +1 -1
- data/doc/file.feasibility.html +1 -1
- data/doc/file.form.html +1 -1
- data/doc/file.generators.html +1 -1
- data/doc/file.glossary.html +1 -1
- data/doc/file.gotchas.html +1 -1
- data/doc/file.index.html +1 -1
- data/doc/file.inheritance.html +1 -1
- data/doc/file.installation.html +1 -1
- data/doc/file.integrations.html +32 -2
- data/doc/file.intents.html +8 -4
- data/doc/file.internal_datastructures.html +1 -1
- data/doc/file.list.html +3 -1
- data/doc/file.maintaining.html +1 -1
- data/doc/file.model_fields.html +1 -1
- data/doc/file.nesting.html +1 -1
- data/doc/file.new.html +1 -1
- data/doc/file.ownership.html +1 -1
- data/doc/file.patterns.html +1 -1
- data/doc/file.pre_built_components.html +1 -1
- data/doc/file.resourceful.html +1 -1
- data/doc/file.show.html +1 -1
- data/doc/file.standalone.html +1 -1
- data/doc/file.virtual_models.html +1 -1
- data/doc/file.with_form.html +1 -1
- data/doc/guide/intents.md +6 -3
- data/doc/guide/pre_built_components/list.md +4 -0
- data/doc/index.html +1 -1
- data/doc/integrations.md +46 -1
- data/doc/method_list.html +69 -53
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/components/buttons/link.rb +37 -2
- data/lib/compony/components/form.rb +2 -6
- data/lib/compony/model_fields/attachment.rb +7 -6
- data/spec/compony/components/buttons/link_spec.rb +73 -0
- data/spec/compony/model_fields/attachment_spec.rb +41 -0
- data/spec/requests/users_crud_spec.rb +7 -0
- metadata +3 -1
|
@@ -648,12 +648,12 @@
|
|
|
648
648
|
<pre class="lines">
|
|
649
649
|
|
|
650
650
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
651
|
+
179
|
|
652
|
+
180
|
|
653
|
+
181</pre>
|
|
654
654
|
</td>
|
|
655
655
|
<td>
|
|
656
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
656
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 179</span>
|
|
657
657
|
|
|
658
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>
|
|
659
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>
|
|
@@ -689,12 +689,12 @@
|
|
|
689
689
|
<pre class="lines">
|
|
690
690
|
|
|
691
691
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
692
|
+
186
|
|
693
|
+
187
|
|
694
|
+
188</pre>
|
|
695
695
|
</td>
|
|
696
696
|
<td>
|
|
697
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
697
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 186</span>
|
|
698
698
|
|
|
699
699
|
<span class='kw'>def</span> <span class='id identifier rubyid_disable!'>disable!</span>
|
|
700
700
|
<span class='ivar'>@form_disabled</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
@@ -748,13 +748,13 @@
|
|
|
748
748
|
<pre class="lines">
|
|
749
749
|
|
|
750
750
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
751
|
+
173
|
|
752
|
+
174
|
|
753
|
+
175
|
|
754
|
+
176</pre>
|
|
755
755
|
</td>
|
|
756
756
|
<td>
|
|
757
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
757
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 173</span>
|
|
758
758
|
|
|
759
759
|
<span class='kw'>def</span> <span class='id identifier rubyid_f'>f</span>
|
|
760
760
|
<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>
|
|
@@ -863,6 +863,10 @@
|
|
|
863
863
|
<pre class="lines">
|
|
864
864
|
|
|
865
865
|
|
|
866
|
+
110
|
|
867
|
+
111
|
|
868
|
+
112
|
|
869
|
+
113
|
|
866
870
|
114
|
|
867
871
|
115
|
|
868
872
|
116
|
|
@@ -891,14 +895,10 @@
|
|
|
891
895
|
139
|
|
892
896
|
140
|
|
893
897
|
141
|
|
894
|
-
142
|
|
895
|
-
143
|
|
896
|
-
144
|
|
897
|
-
145
|
|
898
|
-
146</pre>
|
|
898
|
+
142</pre>
|
|
899
899
|
</td>
|
|
900
900
|
<td>
|
|
901
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
901
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 110</span>
|
|
902
902
|
|
|
903
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>
|
|
904
904
|
<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>
|
|
@@ -1000,13 +1000,13 @@
|
|
|
1000
1000
|
<pre class="lines">
|
|
1001
1001
|
|
|
1002
1002
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1003
|
+
58
|
|
1004
|
+
59
|
|
1005
|
+
60
|
|
1006
|
+
61</pre>
|
|
1007
1007
|
</td>
|
|
1008
1008
|
<td>
|
|
1009
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1009
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 58</span>
|
|
1010
1010
|
|
|
1011
1011
|
<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>
|
|
1012
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>
|
|
@@ -1063,12 +1063,12 @@
|
|
|
1063
1063
|
<pre class="lines">
|
|
1064
1064
|
|
|
1065
1065
|
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1066
|
+
194
|
|
1067
|
+
195
|
|
1068
|
+
196</pre>
|
|
1069
1069
|
</td>
|
|
1070
1070
|
<td>
|
|
1071
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1071
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 194</span>
|
|
1072
1072
|
|
|
1073
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>
|
|
1074
1074
|
<span class='ivar'>@form_params</span> <span class='op'>=</span> <span class='id identifier rubyid_new_form_params'>new_form_params</span>
|
|
@@ -1158,6 +1158,10 @@
|
|
|
1158
1158
|
<pre class="lines">
|
|
1159
1159
|
|
|
1160
1160
|
|
|
1161
|
+
150
|
|
1162
|
+
151
|
|
1163
|
+
152
|
|
1164
|
+
153
|
|
1161
1165
|
154
|
|
1162
1166
|
155
|
|
1163
1167
|
156
|
|
@@ -1171,14 +1175,10 @@
|
|
|
1171
1175
|
164
|
|
1172
1176
|
165
|
|
1173
1177
|
166
|
|
1174
|
-
167
|
|
1175
|
-
168
|
|
1176
|
-
169
|
|
1177
|
-
170
|
|
1178
|
-
171</pre>
|
|
1178
|
+
167</pre>
|
|
1179
1179
|
</td>
|
|
1180
1180
|
<td>
|
|
1181
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1181
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 150</span>
|
|
1182
1182
|
|
|
1183
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>
|
|
1184
1184
|
<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>
|
|
@@ -1267,17 +1267,17 @@
|
|
|
1267
1267
|
<pre class="lines">
|
|
1268
1268
|
|
|
1269
1269
|
|
|
1270
|
+
270
|
|
1271
|
+
271
|
|
1272
|
+
272
|
|
1273
|
+
273
|
|
1270
1274
|
274
|
|
1271
1275
|
275
|
|
1272
1276
|
276
|
|
1273
|
-
277
|
|
1274
|
-
278
|
|
1275
|
-
279
|
|
1276
|
-
280
|
|
1277
|
-
281</pre>
|
|
1277
|
+
277</pre>
|
|
1278
1278
|
</td>
|
|
1279
1279
|
<td>
|
|
1280
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1280
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 270</span>
|
|
1281
1281
|
|
|
1282
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'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
1283
1283
|
<span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
@@ -1318,6 +1318,10 @@
|
|
|
1318
1318
|
<pre class="lines">
|
|
1319
1319
|
|
|
1320
1320
|
|
|
1321
|
+
74
|
|
1322
|
+
75
|
|
1323
|
+
76
|
|
1324
|
+
77
|
|
1321
1325
|
78
|
|
1322
1326
|
79
|
|
1323
1327
|
80
|
|
@@ -1327,14 +1331,10 @@
|
|
|
1327
1331
|
84
|
|
1328
1332
|
85
|
|
1329
1333
|
86
|
|
1330
|
-
87
|
|
1331
|
-
88
|
|
1332
|
-
89
|
|
1333
|
-
90
|
|
1334
|
-
91</pre>
|
|
1334
|
+
87</pre>
|
|
1335
1335
|
</td>
|
|
1336
1336
|
<td>
|
|
1337
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1337
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 74</span>
|
|
1338
1338
|
|
|
1339
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>
|
|
1340
1340
|
<span class='kw'>if</span> <span class='ivar'>@schema_block</span>
|
|
@@ -1419,6 +1419,10 @@
|
|
|
1419
1419
|
<pre class="lines">
|
|
1420
1420
|
|
|
1421
1421
|
|
|
1422
|
+
218
|
|
1423
|
+
219
|
|
1424
|
+
220
|
|
1425
|
+
221
|
|
1422
1426
|
222
|
|
1423
1427
|
223
|
|
1424
1428
|
224
|
|
@@ -1433,14 +1437,10 @@
|
|
|
1433
1437
|
233
|
|
1434
1438
|
234
|
|
1435
1439
|
235
|
|
1436
|
-
236
|
|
1437
|
-
237
|
|
1438
|
-
238
|
|
1439
|
-
239
|
|
1440
|
-
240</pre>
|
|
1440
|
+
236</pre>
|
|
1441
1441
|
</td>
|
|
1442
1442
|
<td>
|
|
1443
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1443
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 218</span>
|
|
1444
1444
|
|
|
1445
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>
|
|
1446
1446
|
<span class='kw'>if</span> <span class='id identifier rubyid_multilang'>multilang</span>
|
|
@@ -1512,12 +1512,12 @@
|
|
|
1512
1512
|
<pre class="lines">
|
|
1513
1513
|
|
|
1514
1514
|
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1515
|
+
261
|
|
1516
|
+
262
|
|
1517
|
+
263</pre>
|
|
1518
1518
|
</td>
|
|
1519
1519
|
<td>
|
|
1520
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1520
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 261</span>
|
|
1521
1521
|
|
|
1522
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>
|
|
1523
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>
|
|
@@ -1571,12 +1571,12 @@
|
|
|
1571
1571
|
<pre class="lines">
|
|
1572
1572
|
|
|
1573
1573
|
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1574
|
+
208
|
|
1575
|
+
209
|
|
1576
|
+
210</pre>
|
|
1577
1577
|
</td>
|
|
1578
1578
|
<td>
|
|
1579
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1579
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 208</span>
|
|
1580
1580
|
|
|
1581
1581
|
<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>
|
|
1582
1582
|
<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>
|
|
@@ -1632,6 +1632,10 @@
|
|
|
1632
1632
|
<pre class="lines">
|
|
1633
1633
|
|
|
1634
1634
|
|
|
1635
|
+
242
|
|
1636
|
+
243
|
|
1637
|
+
244
|
|
1638
|
+
245
|
|
1635
1639
|
246
|
|
1636
1640
|
247
|
|
1637
1641
|
248
|
|
@@ -1641,14 +1645,10 @@
|
|
|
1641
1645
|
252
|
|
1642
1646
|
253
|
|
1643
1647
|
254
|
|
1644
|
-
255
|
|
1645
|
-
256
|
|
1646
|
-
257
|
|
1647
|
-
258
|
|
1648
|
-
259</pre>
|
|
1648
|
+
255</pre>
|
|
1649
1649
|
</td>
|
|
1650
1650
|
<td>
|
|
1651
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1651
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 242</span>
|
|
1652
1652
|
|
|
1653
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>
|
|
1654
1654
|
<span class='comment'># This runs upon component setup.
|
|
@@ -1695,17 +1695,17 @@
|
|
|
1695
1695
|
<pre class="lines">
|
|
1696
1696
|
|
|
1697
1697
|
|
|
1698
|
+
64
|
|
1699
|
+
65
|
|
1700
|
+
66
|
|
1701
|
+
67
|
|
1698
1702
|
68
|
|
1699
1703
|
69
|
|
1700
1704
|
70
|
|
1701
|
-
71
|
|
1702
|
-
72
|
|
1703
|
-
73
|
|
1704
|
-
74
|
|
1705
|
-
75</pre>
|
|
1705
|
+
71</pre>
|
|
1706
1706
|
</td>
|
|
1707
1707
|
<td>
|
|
1708
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1708
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 64</span>
|
|
1709
1709
|
|
|
1710
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>
|
|
1711
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>
|
|
@@ -1746,12 +1746,12 @@
|
|
|
1746
1746
|
<pre class="lines">
|
|
1747
1747
|
|
|
1748
1748
|
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1749
|
+
282
|
|
1750
|
+
283
|
|
1751
|
+
284</pre>
|
|
1752
1752
|
</td>
|
|
1753
1753
|
<td>
|
|
1754
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1754
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 282</span>
|
|
1755
1755
|
|
|
1756
1756
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_autofocus'>skip_autofocus</span>
|
|
1757
1757
|
<span class='ivar'>@skip_autofocus</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
@@ -1795,17 +1795,17 @@
|
|
|
1795
1795
|
<pre class="lines">
|
|
1796
1796
|
|
|
1797
1797
|
|
|
1798
|
+
93
|
|
1799
|
+
94
|
|
1800
|
+
95
|
|
1801
|
+
96
|
|
1798
1802
|
97
|
|
1799
1803
|
98
|
|
1800
1804
|
99
|
|
1801
|
-
100
|
|
1802
|
-
101
|
|
1803
|
-
102
|
|
1804
|
-
103
|
|
1805
|
-
104</pre>
|
|
1805
|
+
100</pre>
|
|
1806
1806
|
</td>
|
|
1807
1807
|
<td>
|
|
1808
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line
|
|
1808
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/form.rb', line 93</span>
|
|
1809
1809
|
|
|
1810
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>
|
|
1811
1811
|
<span class='ivar'>@simpleform</span> <span class='op'>=</span> <span class='id identifier rubyid_simpleform'>simpleform</span>
|
|
@@ -1825,7 +1825,7 @@
|
|
|
1825
1825
|
</div>
|
|
1826
1826
|
|
|
1827
1827
|
<div id="footer">
|
|
1828
|
-
Generated on Wed
|
|
1828
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
1829
1829
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1830
1830
|
0.9.34 (ruby-3.4.9).
|
|
1831
1831
|
</div>
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
</div>
|
|
163
163
|
|
|
164
164
|
<div id="footer">
|
|
165
|
-
Generated on Wed
|
|
165
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
166
166
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
167
167
|
0.9.34 (ruby-3.4.9).
|
|
168
168
|
</div>
|
|
@@ -2705,7 +2705,7 @@
|
|
|
2705
2705
|
</div>
|
|
2706
2706
|
|
|
2707
2707
|
<div id="footer">
|
|
2708
|
-
Generated on Wed
|
|
2708
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
2709
2709
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
2710
2710
|
0.9.34 (ruby-3.4.9).
|
|
2711
2711
|
</div>
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
</div>
|
|
525
525
|
|
|
526
526
|
<div id="footer">
|
|
527
|
-
Generated on Wed
|
|
527
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
528
528
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
529
529
|
0.9.34 (ruby-3.4.9).
|
|
530
530
|
</div>
|
|
@@ -755,7 +755,7 @@
|
|
|
755
755
|
</div>
|
|
756
756
|
|
|
757
757
|
<div id="footer">
|
|
758
|
-
Generated on Wed
|
|
758
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
759
759
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
760
760
|
0.9.34 (ruby-3.4.9).
|
|
761
761
|
</div>
|
|
@@ -738,7 +738,7 @@
|
|
|
738
738
|
</div>
|
|
739
739
|
|
|
740
740
|
<div id="footer">
|
|
741
|
-
Generated on Wed
|
|
741
|
+
Generated on Wed Nov 25 14:15:21 2026 by
|
|
742
742
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
743
743
|
0.9.34 (ruby-3.4.9).
|
|
744
744
|
</div>
|
data/doc/Compony/Components.html
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<div id="footer">
|
|
121
|
-
Generated on Wed
|
|
121
|
+
Generated on Wed Nov 25 14:15:19 2026 by
|
|
122
122
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
123
123
|
0.9.34 (ruby-3.4.9).
|
|
124
124
|
</div>
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
</div>
|
|
127
127
|
|
|
128
128
|
<div id="footer">
|
|
129
|
-
Generated on Wed
|
|
129
|
+
Generated on Wed Nov 25 14:15:19 2026 by
|
|
130
130
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
131
131
|
0.9.34 (ruby-3.4.9).
|
|
132
132
|
</div>
|
data/doc/Compony/Engine.html
CHANGED
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
</div>
|
|
124
124
|
|
|
125
125
|
<div id="footer">
|
|
126
|
-
Generated on Wed
|
|
126
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
127
127
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
128
128
|
0.9.34 (ruby-3.4.9).
|
|
129
129
|
</div>
|
data/doc/Compony/Intent.html
CHANGED
|
@@ -1561,7 +1561,7 @@
|
|
|
1561
1561
|
</div>
|
|
1562
1562
|
|
|
1563
1563
|
<div id="footer">
|
|
1564
|
-
Generated on Wed
|
|
1564
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
1565
1565
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1566
1566
|
0.9.34 (ruby-3.4.9).
|
|
1567
1567
|
</div>
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
</div>
|
|
404
404
|
|
|
405
405
|
<div id="footer">
|
|
406
|
-
Generated on Wed
|
|
406
|
+
Generated on Wed Nov 25 14:15:21 2026 by
|
|
407
407
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
408
408
|
0.9.34 (ruby-3.4.9).
|
|
409
409
|
</div>
|
|
@@ -443,7 +443,7 @@ instance_of_a_hash.roo --> nil
|
|
|
443
443
|
</div>
|
|
444
444
|
|
|
445
445
|
<div id="footer">
|
|
446
|
-
Generated on Wed
|
|
446
|
+
Generated on Wed Nov 25 14:15:21 2026 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.4.9).
|
|
449
449
|
</div>
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
</div>
|
|
510
510
|
|
|
511
511
|
<div id="footer">
|
|
512
|
-
Generated on Wed
|
|
512
|
+
Generated on Wed Nov 25 14:15:21 2026 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.4.9).
|
|
515
515
|
</div>
|
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
</div>
|
|
604
604
|
|
|
605
605
|
<div id="footer">
|
|
606
|
-
Generated on Wed
|
|
606
|
+
Generated on Wed Nov 25 14:15:21 2026 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.4.9).
|
|
609
609
|
</div>
|
|
@@ -319,16 +319,16 @@
|
|
|
319
319
|
<pre class="lines">
|
|
320
320
|
|
|
321
321
|
|
|
322
|
-
58
|
|
323
322
|
59
|
|
324
323
|
60
|
|
325
324
|
61
|
|
326
325
|
62
|
|
327
326
|
63
|
|
328
|
-
64
|
|
327
|
+
64
|
|
328
|
+
65</pre>
|
|
329
329
|
</td>
|
|
330
330
|
<td>
|
|
331
|
-
<pre class="code"><span class="info file"># File 'lib/compony/model_fields/attachment.rb', line
|
|
331
|
+
<pre class="code"><span class="info file"># File 'lib/compony/model_fields/attachment.rb', line 59</span>
|
|
332
332
|
|
|
333
333
|
<span class='kw'>def</span> <span class='id identifier rubyid_resolve_attachment!'>resolve_attachment!</span>
|
|
334
334
|
<span class='id identifier rubyid_attachment_info'>attachment_info</span> <span class='op'>=</span> <span class='id identifier rubyid_model_class'>model_class</span><span class='period'>.</span><span class='id identifier rubyid_reflect_on_attachment'>reflect_on_attachment</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
@@ -394,7 +394,8 @@
|
|
|
394
394
|
49
|
|
395
395
|
50
|
|
396
396
|
51
|
|
397
|
-
52
|
|
397
|
+
52
|
|
398
|
+
53</pre>
|
|
398
399
|
</td>
|
|
399
400
|
<td>
|
|
400
401
|
<pre class="code"><span class="info file"># File 'lib/compony/model_fields/attachment.rb', line 24</span>
|
|
@@ -410,15 +411,16 @@
|
|
|
410
411
|
<span class='id identifier rubyid_helpers'>helpers</span> <span class='op'>=</span> <span class='const'>ActionController</span><span class='op'>::</span><span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_helpers'>helpers</span>
|
|
411
412
|
<span class='kw'>return</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_capture'>capture</span> <span class='kw'>do</span>
|
|
412
413
|
<span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span> <span class='id identifier rubyid_form'>form</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
413
|
-
<span class='comment'># List currently present attachments
|
|
414
|
+
<span class='comment'># List currently present attachments, each with a checked checkbox submitting its signed id. Unchecking it drops the id
|
|
415
|
+
</span> <span class='comment'># from the submitted list, which removes the attachment on save. This needs no JavaScript.
|
|
414
416
|
</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_div'>div</span> <span class='label'>class:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compony-attachments-item-wrapper</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
|
415
417
|
<span class='id identifier rubyid_form'>form</span><span class='period'>.</span><span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</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_attachment'>attachment</span><span class='op'>|</span>
|
|
418
|
+
<span class='id identifier rubyid_checkbox_id'>checkbox_id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_form'>form</span><span class='period'>.</span><span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_model_name'>model_name</span><span class='period'>.</span><span class='id identifier rubyid_singular'>singular</span><span class='embexpr_end'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_keep_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attachment'>attachment</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
416
419
|
<span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_div'>div</span> <span class='label'>class:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compony-attachments-item</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
|
417
|
-
<span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
<span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier
|
|
421
|
-
<span class='label'>onclick:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>event.preventDefault(); this.closest('div').remove();</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
420
|
+
<span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_check_box_tag'>check_box_tag</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_form'>form</span><span class='period'>.</span><span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_model_name'>model_name</span><span class='period'>.</span><span class='id identifier rubyid_singular'>singular</span><span class='embexpr_end'>}</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>][]</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_attachment'>attachment</span><span class='period'>.</span><span class='id identifier rubyid_signed_id'>signed_id</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span>
|
|
421
|
+
<span class='label'>id:</span> <span class='id identifier rubyid_checkbox_id'>checkbox_id</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compony-attachments-keep</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
422
|
+
<span class='label'>title:</span> <span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_t'>t</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compony.model_fields.attachment.keep_hint</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
423
|
+
<span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_label_tag'>label_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_checkbox_id'>checkbox_id</span><span class='comma'>,</span> <span class='id identifier rubyid_attachment'>attachment</span><span class='period'>.</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>compony-attachments-filename</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
422
424
|
<span class='kw'>end</span>
|
|
423
425
|
<span class='kw'>end</span>
|
|
424
426
|
<span class='kw'>end</span>
|
|
@@ -495,7 +497,7 @@
|
|
|
495
497
|
</div>
|
|
496
498
|
|
|
497
499
|
<div id="footer">
|
|
498
|
-
Generated on Wed
|
|
500
|
+
Generated on Wed Nov 25 14:15:21 2026 by
|
|
499
501
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
500
502
|
0.9.34 (ruby-3.4.9).
|
|
501
503
|
</div>
|
|
@@ -1192,7 +1192,7 @@
|
|
|
1192
1192
|
</div>
|
|
1193
1193
|
|
|
1194
1194
|
<div id="footer">
|
|
1195
|
-
Generated on Wed
|
|
1195
|
+
Generated on Wed Nov 25 14:15:20 2026 by
|
|
1196
1196
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1197
1197
|
0.9.34 (ruby-3.4.9).
|
|
1198
1198
|
</div>
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
</div>
|
|
355
355
|
|
|
356
356
|
<div id="footer">
|
|
357
|
-
Generated on Wed
|
|
357
|
+
Generated on Wed Nov 25 14:15:21 2026 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.4.9).
|
|
360
360
|
</div>
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
</div>
|
|
290
290
|
|
|
291
291
|
<div id="footer">
|
|
292
|
-
Generated on Wed
|
|
292
|
+
Generated on Wed Nov 25 14:15:21 2026 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.4.9).
|
|
295
295
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on Wed
|
|
225
|
+
Generated on Wed Nov 25 14:15:21 2026 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.4.9).
|
|
228
228
|
</div>
|