compony 0.11.12 → 0.11.14
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/.rspec +2 -0
- data/CHANGELOG.md +16 -0
- data/CLAUDE.md +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +145 -106
- data/README.md +12 -1
- data/Rakefile +10 -0
- data/TODO.md +2 -1
- data/VERSION +1 -1
- data/compony.gemspec +5 -3
- 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 +1 -1
- data/doc/Compony/Components/Buttons/Link.html +1 -1
- 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 +41 -41
- 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 +2 -2
- 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 +8 -2
- 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 +13 -13
- 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 +276 -92
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.CHANGELOG.html +89 -77
- data/doc/file.README.html +21 -11
- data/doc/file.basic_component.html +14 -14
- data/doc/file.cookbook.html +27 -27
- data/doc/file.destroy.html +2 -2
- data/doc/file.dsl_reference.html +199 -199
- data/doc/file.edit.html +3 -3
- data/doc/file.example.html +13 -13
- data/doc/file.example_advanced.html +10 -10
- data/doc/file.feasibility.html +2 -2
- data/doc/file.form.html +20 -8
- data/doc/file.generators.html +3 -3
- data/doc/file.glossary.html +44 -44
- data/doc/file.gotchas.html +35 -35
- data/doc/file.index.html +10 -10
- data/doc/file.inheritance.html +5 -5
- data/doc/file.installation.html +9 -9
- data/doc/file.integrations.html +46 -46
- data/doc/file.intents.html +11 -11
- data/doc/file.internal_datastructures.html +6 -6
- data/doc/file.list.html +35 -35
- data/doc/file.maintaining.html +21 -21
- data/doc/file.model_fields.html +3 -3
- data/doc/file.nesting.html +5 -5
- data/doc/file.new.html +3 -3
- data/doc/file.ownership.html +2 -2
- data/doc/file.patterns.html +50 -50
- data/doc/file.pre_built_components.html +2 -2
- data/doc/file.resourceful.html +5 -5
- data/doc/file.show.html +17 -17
- data/doc/file.standalone.html +12 -12
- data/doc/file.virtual_models.html +2 -2
- data/doc/file.with_form.html +23 -23
- data/doc/guide/pre_built_components/form.md +21 -2
- data/doc/index.html +21 -11
- data/doc/method_list.html +16 -0
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/components/form.rb +5 -4
- data/lib/compony/model_fields/base.rb +3 -0
- data/lib/compony/model_mixin.rb +3 -2
- data/lib/compony.rb +19 -0
- data/spec/README.md +22 -0
- data/spec/compony/component_spec.rb +80 -0
- data/spec/compony/components/form_spec.rb +31 -0
- data/spec/compony/compony_spec.rb +130 -0
- data/spec/compony/intent_spec.rb +94 -0
- data/spec/compony/method_accessible_hash_spec.rb +32 -0
- data/spec/compony/model_fields_spec.rb +70 -0
- data/spec/compony/model_mixin_spec.rb +109 -0
- data/spec/compony/natural_ordering_spec.rb +61 -0
- data/spec/dummy/app/components/statics/home.rb +17 -0
- data/spec/dummy/app/components/statics/secret.rb +15 -0
- data/spec/dummy/app/components/users/destroy.rb +2 -0
- data/spec/dummy/app/components/users/edit.rb +2 -0
- data/spec/dummy/app/components/users/form.rb +14 -0
- data/spec/dummy/app/components/users/index.rb +29 -0
- data/spec/dummy/app/components/users/new.rb +2 -0
- data/spec/dummy/app/components/users/show.rb +26 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/models/ability.rb +7 -0
- data/spec/dummy/app/models/application_record.rb +4 -0
- data/spec/dummy/app/models/user.rb +22 -0
- data/spec/dummy/app/views/layouts/application.html.erb +7 -0
- data/spec/dummy/config/application.rb +20 -0
- data/spec/dummy/config/database.yml +3 -0
- data/spec/dummy/config/environment.rb +3 -0
- data/spec/dummy/config/initializers/simple_form.rb +9 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/schema.rb +14 -0
- data/spec/rails_helper.rb +23 -0
- data/spec/requests/authorization_spec.rb +16 -0
- data/spec/requests/plain_component_spec.rb +9 -0
- data/spec/requests/routing_spec.rb +20 -0
- data/spec/requests/users_crud_spec.rb +99 -0
- metadata +63 -1
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
</div>
|
|
604
604
|
|
|
605
605
|
<div id="footer">
|
|
606
|
-
Generated on
|
|
606
|
+
Generated on Wed Oct 7 10:48: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>
|
|
@@ -868,7 +868,7 @@
|
|
|
868
868
|
</div>
|
|
869
869
|
|
|
870
870
|
<div id="footer">
|
|
871
|
-
Generated on
|
|
871
|
+
Generated on Wed Oct 7 10:48:20 2026 by
|
|
872
872
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
873
873
|
0.9.34 (ruby-3.4.9).
|
|
874
874
|
</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on
|
|
119
|
+
Generated on Wed Oct 7 10:48:20 2026 by
|
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.9.34 (ruby-3.4.9).
|
|
122
122
|
</div>
|
|
@@ -1253,7 +1253,7 @@
|
|
|
1253
1253
|
</div>
|
|
1254
1254
|
|
|
1255
1255
|
<div id="footer">
|
|
1256
|
-
Generated on
|
|
1256
|
+
Generated on Wed Oct 7 10:48:20 2026 by
|
|
1257
1257
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1258
1258
|
0.9.34 (ruby-3.4.9).
|
|
1259
1259
|
</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on
|
|
119
|
+
Generated on Wed Oct 7 10:48:20 2026 by
|
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.9.34 (ruby-3.4.9).
|
|
122
122
|
</div>
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
</div>
|
|
273
273
|
|
|
274
274
|
<div id="footer">
|
|
275
|
-
Generated on
|
|
275
|
+
Generated on Wed Oct 7 10:48:21 2026 by
|
|
276
276
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
277
277
|
0.9.34 (ruby-3.4.9).
|
|
278
278
|
</div>
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
</div>
|
|
243
243
|
|
|
244
244
|
<div id="footer">
|
|
245
|
-
Generated on
|
|
245
|
+
Generated on Wed Oct 7 10:48:21 2026 by
|
|
246
246
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
247
247
|
0.9.34 (ruby-3.4.9).
|
|
248
248
|
</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on
|
|
119
|
+
Generated on Wed Oct 7 10:48:20 2026 by
|
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.9.34 (ruby-3.4.9).
|
|
122
122
|
</div>
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
</div>
|
|
429
429
|
|
|
430
430
|
<div id="footer">
|
|
431
|
-
Generated on
|
|
431
|
+
Generated on Wed Oct 7 10:48:21 2026 by
|
|
432
432
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
433
433
|
0.9.34 (ruby-3.4.9).
|
|
434
434
|
</div>
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
</div>
|
|
525
525
|
|
|
526
526
|
<div id="footer">
|
|
527
|
-
Generated on
|
|
527
|
+
Generated on Wed Oct 7 10:48: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>
|
|
@@ -648,12 +648,12 @@
|
|
|
648
648
|
<pre class="lines">
|
|
649
649
|
|
|
650
650
|
|
|
651
|
-
182
|
|
652
651
|
183
|
|
653
|
-
184
|
|
652
|
+
184
|
|
653
|
+
185</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 183</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
|
-
189
|
|
693
692
|
190
|
|
694
|
-
191
|
|
693
|
+
191
|
|
694
|
+
192</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 190</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
|
-
176
|
|
752
751
|
177
|
|
753
752
|
178
|
|
754
|
-
179
|
|
753
|
+
179
|
|
754
|
+
180</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 177</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>
|
|
@@ -815,7 +815,7 @@
|
|
|
815
815
|
|
|
816
816
|
—
|
|
817
817
|
<div class='inline'>
|
|
818
|
-
<p>If true, generates one suffixed input per
|
|
818
|
+
<p>If true, generates one suffixed input per content locale and returns the array (useful with the “mobility” gem). See <span class='object_link'><a href="../../Compony.html#content_locales-class_method" title="Compony.content_locales (method)">Compony.content_locales</a></span>.</p>
|
|
819
819
|
</div>
|
|
820
820
|
|
|
821
821
|
</li>
|
|
@@ -863,7 +863,6 @@
|
|
|
863
863
|
<pre class="lines">
|
|
864
864
|
|
|
865
865
|
|
|
866
|
-
113
|
|
867
866
|
114
|
|
868
867
|
115
|
|
869
868
|
116
|
|
@@ -895,16 +894,17 @@
|
|
|
895
894
|
142
|
|
896
895
|
143
|
|
897
896
|
144
|
|
898
|
-
145
|
|
897
|
+
145
|
|
898
|
+
146</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 114</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>
|
|
905
905
|
|
|
906
906
|
<span class='kw'>if</span> <span class='id identifier rubyid_multilang'>multilang</span>
|
|
907
|
-
<span class='const'>
|
|
907
|
+
<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_content_locales'><span class='object_link'><a href="../../Compony.html#content_locales-class_method" title="Compony.content_locales (method)">content_locales</a></span></span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_locale'>locale</span><span class='op'>|</span> <span class='id identifier rubyid_field'>field</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</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='embexpr_beg'>#{</span><span class='id identifier rubyid_locale'>locale</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_input_opts'>input_opts</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
908
908
|
<span class='kw'>else</span>
|
|
909
909
|
<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>
|
|
910
910
|
|
|
@@ -1063,12 +1063,12 @@
|
|
|
1063
1063
|
<pre class="lines">
|
|
1064
1064
|
|
|
1065
1065
|
|
|
1066
|
-
197
|
|
1067
1066
|
198
|
|
1068
|
-
199
|
|
1067
|
+
199
|
|
1068
|
+
200</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 198</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,7 +1158,6 @@
|
|
|
1158
1158
|
<pre class="lines">
|
|
1159
1159
|
|
|
1160
1160
|
|
|
1161
|
-
153
|
|
1162
1161
|
154
|
|
1163
1162
|
155
|
|
1164
1163
|
156
|
|
@@ -1175,10 +1174,11 @@
|
|
|
1175
1174
|
167
|
|
1176
1175
|
168
|
|
1177
1176
|
169
|
|
1178
|
-
170
|
|
1177
|
+
170
|
|
1178
|
+
171</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 154</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
|
-
273
|
|
1271
1270
|
274
|
|
1272
1271
|
275
|
|
1273
1272
|
276
|
|
1274
1273
|
277
|
|
1275
1274
|
278
|
|
1276
1275
|
279
|
|
1277
|
-
280
|
|
1276
|
+
280
|
|
1277
|
+
281</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 274</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>
|
|
@@ -1405,7 +1405,7 @@
|
|
|
1405
1405
|
|
|
1406
1406
|
—
|
|
1407
1407
|
<div class='inline'>
|
|
1408
|
-
<p>If true, whitelists one suffixed field per
|
|
1408
|
+
<p>If true, whitelists one suffixed field per content locale, see <span class='object_link'><a href="../../Compony.html#content_locales-class_method" title="Compony.content_locales (method)">Compony.content_locales</a></span> (useful with the “mobility” gem).</p>
|
|
1409
1409
|
</div>
|
|
1410
1410
|
|
|
1411
1411
|
</li>
|
|
@@ -1419,7 +1419,6 @@
|
|
|
1419
1419
|
<pre class="lines">
|
|
1420
1420
|
|
|
1421
1421
|
|
|
1422
|
-
221
|
|
1423
1422
|
222
|
|
1424
1423
|
223
|
|
1425
1424
|
224
|
|
@@ -1437,14 +1436,15 @@
|
|
|
1437
1436
|
236
|
|
1438
1437
|
237
|
|
1439
1438
|
238
|
|
1440
|
-
239
|
|
1439
|
+
239
|
|
1440
|
+
240</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 222</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>
|
|
1447
|
-
<span class='const'>
|
|
1447
|
+
<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_content_locales'><span class='object_link'><a href="../../Compony.html#content_locales-class_method" title="Compony.content_locales (method)">content_locales</a></span></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_locale'>locale</span><span class='op'>|</span> <span class='id identifier rubyid_schema_field'>schema_field</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field_name'>field_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_locale'>locale</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
1448
1448
|
<span class='kw'>else</span>
|
|
1449
1449
|
<span class='comment'># This runs upon component setup.
|
|
1450
1450
|
</span> <span class='ivar'>@schema_lines_for_data</span> <span class='op'><<</span> <span class='id identifier rubyid_proc'>proc</span> <span class='kw'>do</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>
|
|
@@ -1512,12 +1512,12 @@
|
|
|
1512
1512
|
<pre class="lines">
|
|
1513
1513
|
|
|
1514
1514
|
|
|
1515
|
-
264
|
|
1516
1515
|
265
|
|
1517
|
-
266
|
|
1516
|
+
266
|
|
1517
|
+
267</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 265</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
|
-
211
|
|
1575
1574
|
212
|
|
1576
|
-
213
|
|
1575
|
+
213
|
|
1576
|
+
214</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 212</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,7 +1632,6 @@
|
|
|
1632
1632
|
<pre class="lines">
|
|
1633
1633
|
|
|
1634
1634
|
|
|
1635
|
-
245
|
|
1636
1635
|
246
|
|
1637
1636
|
247
|
|
1638
1637
|
248
|
|
@@ -1645,10 +1644,11 @@
|
|
|
1645
1644
|
255
|
|
1646
1645
|
256
|
|
1647
1646
|
257
|
|
1648
|
-
258
|
|
1647
|
+
258
|
|
1648
|
+
259</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 246</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.
|
|
@@ -1746,12 +1746,12 @@
|
|
|
1746
1746
|
<pre class="lines">
|
|
1747
1747
|
|
|
1748
1748
|
|
|
1749
|
-
285
|
|
1750
1749
|
286
|
|
1751
|
-
287
|
|
1750
|
+
287
|
|
1751
|
+
288</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 286</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>
|
|
@@ -1825,7 +1825,7 @@
|
|
|
1825
1825
|
</div>
|
|
1826
1826
|
|
|
1827
1827
|
<div id="footer">
|
|
1828
|
-
Generated on
|
|
1828
|
+
Generated on Wed Oct 7 10:48: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
|
|
165
|
+
Generated on Wed Oct 7 10:48:21 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
|
|
2708
|
+
Generated on Wed Oct 7 10:48:21 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
|
|
527
|
+
Generated on Wed Oct 7 10:48: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
|
|
758
|
+
Generated on Wed Oct 7 10:48:21 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
|
|
741
|
+
Generated on Wed Oct 7 10:48: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
|
|
121
|
+
Generated on Wed Oct 7 10:48:20 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
|
|
129
|
+
Generated on Wed Oct 7 10:48:20 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
|
|
126
|
+
Generated on Wed Oct 7 10:48: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
|
|
1564
|
+
Generated on Wed Oct 7 10:48: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>
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
|
|
293
293
|
—
|
|
294
294
|
<div class='inline'>
|
|
295
|
-
<p>If specified, will insert the intent before the other. When replacing, an element keeps its position unless
|
|
295
|
+
<p>If specified, will insert the intent before the other. When replacing, an element keeps its position unless <code>before:`</code> is passed.</p>
|
|
296
296
|
</div>
|
|
297
297
|
|
|
298
298
|
</li>
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
</div>
|
|
404
404
|
|
|
405
405
|
<div id="footer">
|
|
406
|
-
Generated on
|
|
406
|
+
Generated on Wed Oct 7 10:48: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
|
|
446
|
+
Generated on Wed Oct 7 10:48: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
|
|
512
|
+
Generated on Wed Oct 7 10:48: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
|
|
606
|
+
Generated on Wed Oct 7 10:48: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>
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
</div>
|
|
496
496
|
|
|
497
497
|
<div id="footer">
|
|
498
|
-
Generated on
|
|
498
|
+
Generated on Wed Oct 7 10:48:21 2026 by
|
|
499
499
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
500
500
|
0.9.34 (ruby-3.4.9).
|
|
501
501
|
</div>
|
|
@@ -1119,7 +1119,10 @@
|
|
|
1119
1119
|
75
|
|
1120
1120
|
76
|
|
1121
1121
|
77
|
|
1122
|
-
78
|
|
1122
|
+
78
|
|
1123
|
+
79
|
|
1124
|
+
80
|
|
1125
|
+
81</pre>
|
|
1123
1126
|
</td>
|
|
1124
1127
|
<td>
|
|
1125
1128
|
<pre class="code"><span class="info file"># File 'lib/compony/model_fields/base.rb', line 70</span>
|
|
@@ -1129,6 +1132,9 @@
|
|
|
1129
1132
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_transform_block'>transform_block</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
1130
1133
|
<span class='kw'>return</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_safe_join'>safe_join</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>, </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
1131
1134
|
<span class='kw'>else</span>
|
|
1135
|
+
<span class='comment'># A nil value has nothing to transform, and the transform blocks are written for actual values, thus they are
|
|
1136
|
+
</span> <span class='comment'># not required to be nil safe. This mirrors the compact applied to enumerables above.
|
|
1137
|
+
</span> <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
1132
1138
|
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_transform_block'>transform_block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
1133
1139
|
<span class='kw'>return</span> <span class='id identifier rubyid_data'>data</span>
|
|
1134
1140
|
<span class='kw'>end</span>
|
|
@@ -1186,7 +1192,7 @@
|
|
|
1186
1192
|
</div>
|
|
1187
1193
|
|
|
1188
1194
|
<div id="footer">
|
|
1189
|
-
Generated on
|
|
1195
|
+
Generated on Wed Oct 7 10:48:21 2026 by
|
|
1190
1196
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1191
1197
|
0.9.34 (ruby-3.4.9).
|
|
1192
1198
|
</div>
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
</div>
|
|
355
355
|
|
|
356
356
|
<div id="footer">
|
|
357
|
-
Generated on
|
|
357
|
+
Generated on Wed Oct 7 10:48: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
|
|
292
|
+
Generated on Wed Oct 7 10:48: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
|
|
225
|
+
Generated on Wed Oct 7 10:48: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>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Wed Oct 7 10:48: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>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Wed Oct 7 10:48: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>
|