compony 0.6.0 → 0.6.1
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 +4 -0
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/compony.gemspec +2 -2
- 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/Button.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 +1 -1
- data/doc/Compony/Components/Index.html +1 -1
- data/doc/Compony/Components/List.html +235 -146
- 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/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 +1 -1
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +182 -174
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/components/list.rb +10 -0
- metadata +1 -1
@@ -187,6 +187,30 @@
|
|
187
187
|
<p>DSL method Adds multiple columns at once, sharing the same kwargs.</p>
|
188
188
|
</div></span>
|
189
189
|
|
190
|
+
</li>
|
191
|
+
|
192
|
+
|
193
|
+
<li class="public ">
|
194
|
+
<span class="summary_signature">
|
195
|
+
|
196
|
+
<a href="#default_sorting-instance_method" title="#default_sorting (instance method)">#<strong>default_sorting</strong>(new_default_sorting) ⇒ Object </a>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</span>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>DSL method Overrides the default sorting.</p>
|
212
|
+
</div></span>
|
213
|
+
|
190
214
|
</li>
|
191
215
|
|
192
216
|
|
@@ -361,7 +385,7 @@
|
|
361
385
|
<li class="public ">
|
362
386
|
<span class="summary_signature">
|
363
387
|
|
364
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(skip_pagination: false, results_per_page: 20, skip_filtering: false, skip_sorting: false, skip_sorting_in_filter: false, skip_sorting_links: false, skip_columns: [], skip_row_actions: [], skip_filters: []) ⇒ List </a>
|
388
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(skip_pagination: false, results_per_page: 20, skip_filtering: false, skip_sorting: false, skip_sorting_in_filter: false, skip_sorting_links: false, skip_columns: [], skip_row_actions: [], skip_filters: [], default_sorting: 'id asc') ⇒ List </a>
|
365
389
|
|
366
390
|
|
367
391
|
|
@@ -824,7 +848,7 @@
|
|
824
848
|
<div class="method_details first">
|
825
849
|
<h3 class="signature first" id="initialize-instance_method">
|
826
850
|
|
827
|
-
#<strong>initialize</strong>(skip_pagination: false, results_per_page: 20, skip_filtering: false, skip_sorting: false, skip_sorting_in_filter: false, skip_sorting_links: false, skip_columns: [], skip_row_actions: [], skip_filters: []) ⇒ <tt><span class='object_link'><a href="" title="Compony::Components::List (class)">List</a></span></tt>
|
851
|
+
#<strong>initialize</strong>(skip_pagination: false, results_per_page: 20, skip_filtering: false, skip_sorting: false, skip_sorting_in_filter: false, skip_sorting_links: false, skip_columns: [], skip_row_actions: [], skip_filters: [], default_sorting: 'id asc') ⇒ <tt><span class='object_link'><a href="" title="Compony::Components::List (class)">List</a></span></tt>
|
828
852
|
|
829
853
|
|
830
854
|
|
@@ -1000,6 +1024,24 @@
|
|
1000
1024
|
—
|
1001
1025
|
<div class='inline'>
|
1002
1026
|
<p>Filter names to be skipped.</p>
|
1027
|
+
</div>
|
1028
|
+
|
1029
|
+
</li>
|
1030
|
+
|
1031
|
+
<li>
|
1032
|
+
|
1033
|
+
<span class='name'>default_sorting</span>
|
1034
|
+
|
1035
|
+
|
1036
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1037
|
+
|
1038
|
+
|
1039
|
+
<em class="default">(defaults to: <tt>'id asc'</tt>)</em>
|
1040
|
+
|
1041
|
+
|
1042
|
+
—
|
1043
|
+
<div class='inline'>
|
1044
|
+
<p>Default sorting (only relevant for ransack based sorting)</p>
|
1003
1045
|
</div>
|
1004
1046
|
|
1005
1047
|
</li>
|
@@ -1013,7 +1055,6 @@
|
|
1013
1055
|
<pre class="lines">
|
1014
1056
|
|
1015
1057
|
|
1016
|
-
19
|
1017
1058
|
20
|
1018
1059
|
21
|
1019
1060
|
22
|
@@ -1041,10 +1082,13 @@
|
|
1041
1082
|
44
|
1042
1083
|
45
|
1043
1084
|
46
|
1044
|
-
47
|
1085
|
+
47
|
1086
|
+
48
|
1087
|
+
49
|
1088
|
+
50</pre>
|
1045
1089
|
</td>
|
1046
1090
|
<td>
|
1047
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1091
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 20</span>
|
1048
1092
|
|
1049
1093
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span>
|
1050
1094
|
<span class='label'>skip_pagination:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
@@ -1056,6 +1100,7 @@
|
|
1056
1100
|
<span class='label'>skip_columns:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1057
1101
|
<span class='label'>skip_row_actions:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1058
1102
|
<span class='label'>skip_filters:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
1103
|
+
<span class='label'>default_sorting:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id asc</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
1059
1104
|
<span class='op'>**</span><span class='rparen'>)</span>
|
1060
1105
|
<span class='ivar'>@pagination</span> <span class='op'>=</span> <span class='op'>!</span><span class='id identifier rubyid_skip_pagination'>skip_pagination</span>
|
1061
1106
|
<span class='ivar'>@results_per_page</span> <span class='op'>=</span> <span class='id identifier rubyid_results_per_page'>results_per_page</span>
|
@@ -1069,6 +1114,7 @@
|
|
1069
1114
|
<span class='ivar'>@filters</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1070
1115
|
<span class='ivar'>@sorts</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1071
1116
|
<span class='ivar'>@skipped_filters</span> <span class='op'>=</span> <span class='id identifier rubyid_skip_filters'>skip_filters</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
|
1117
|
+
<span class='ivar'>@default_sorting</span> <span class='op'>=</span> <span class='id identifier rubyid_default_sorting'>default_sorting</span>
|
1072
1118
|
<span class='ivar'>@filter_label_class</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>list-filter-label</span><span class='tstring_end'>'</span></span>
|
1073
1119
|
<span class='ivar'>@filter_input_class</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>list-filter-input</span><span class='tstring_end'>'</span></span>
|
1074
1120
|
<span class='ivar'>@filter_select_class</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>list-filter-select</span><span class='tstring_end'>'</span></span>
|
@@ -1203,22 +1249,22 @@
|
|
1203
1249
|
<pre class="lines">
|
1204
1250
|
|
1205
1251
|
|
1206
|
-
123
|
1207
|
-
124
|
1208
|
-
125
|
1209
|
-
126
|
1210
|
-
127
|
1211
|
-
128
|
1212
|
-
129
|
1213
|
-
130
|
1214
|
-
131
|
1215
1252
|
132
|
1216
1253
|
133
|
1217
1254
|
134
|
1218
|
-
135
|
1255
|
+
135
|
1256
|
+
136
|
1257
|
+
137
|
1258
|
+
138
|
1259
|
+
139
|
1260
|
+
140
|
1261
|
+
141
|
1262
|
+
142
|
1263
|
+
143
|
1264
|
+
144</pre>
|
1219
1265
|
</td>
|
1220
1266
|
<td>
|
1221
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1267
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 132</span>
|
1222
1268
|
|
1223
1269
|
<span class='kw'>def</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>link_opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1224
1270
|
<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>
|
@@ -1264,12 +1310,12 @@
|
|
1264
1310
|
<pre class="lines">
|
1265
1311
|
|
1266
1312
|
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1313
|
+
148
|
1314
|
+
149
|
1315
|
+
150</pre>
|
1270
1316
|
</td>
|
1271
1317
|
<td>
|
1272
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1318
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 148</span>
|
1273
1319
|
|
1274
1320
|
<span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_col_names'>col_names</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
1275
1321
|
<span class='id identifier rubyid_col_names'>col_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_col_name'>col_name</span><span class='op'>|</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_col_name'>col_name</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
@@ -1277,6 +1323,47 @@
|
|
1277
1323
|
</td>
|
1278
1324
|
</tr>
|
1279
1325
|
</table>
|
1326
|
+
</div>
|
1327
|
+
|
1328
|
+
<div class="method_details ">
|
1329
|
+
<h3 class="signature " id="default_sorting-instance_method">
|
1330
|
+
|
1331
|
+
#<strong>default_sorting</strong>(new_default_sorting) ⇒ <tt>Object</tt>
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
|
1337
|
+
</h3><div class="docstring">
|
1338
|
+
<div class="discussion">
|
1339
|
+
|
1340
|
+
<p>DSL method Overrides the default sorting</p>
|
1341
|
+
|
1342
|
+
|
1343
|
+
</div>
|
1344
|
+
</div>
|
1345
|
+
<div class="tags">
|
1346
|
+
|
1347
|
+
|
1348
|
+
</div><table class="source_code">
|
1349
|
+
<tr>
|
1350
|
+
<td>
|
1351
|
+
<pre class="lines">
|
1352
|
+
|
1353
|
+
|
1354
|
+
91
|
1355
|
+
92
|
1356
|
+
93</pre>
|
1357
|
+
</td>
|
1358
|
+
<td>
|
1359
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 91</span>
|
1360
|
+
|
1361
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_sorting'>default_sorting</span><span class='lparen'>(</span><span class='id identifier rubyid_new_default_sorting'>new_default_sorting</span><span class='rparen'>)</span>
|
1362
|
+
<span class='ivar'>@default_sorting</span> <span class='op'>=</span> <span class='id identifier rubyid_new_default_sorting'>new_default_sorting</span>
|
1363
|
+
<span class='kw'>end</span></pre>
|
1364
|
+
</td>
|
1365
|
+
</tr>
|
1366
|
+
</table>
|
1280
1367
|
</div>
|
1281
1368
|
|
1282
1369
|
<div class="method_details ">
|
@@ -1359,15 +1446,6 @@
|
|
1359
1446
|
<pre class="lines">
|
1360
1447
|
|
1361
1448
|
|
1362
|
-
182
|
1363
|
-
183
|
1364
|
-
184
|
1365
|
-
185
|
1366
|
-
186
|
1367
|
-
187
|
1368
|
-
188
|
1369
|
-
189
|
1370
|
-
190
|
1371
1449
|
191
|
1372
1450
|
192
|
1373
1451
|
193
|
@@ -1380,10 +1458,19 @@
|
|
1380
1458
|
200
|
1381
1459
|
201
|
1382
1460
|
202
|
1383
|
-
203
|
1461
|
+
203
|
1462
|
+
204
|
1463
|
+
205
|
1464
|
+
206
|
1465
|
+
207
|
1466
|
+
208
|
1467
|
+
209
|
1468
|
+
210
|
1469
|
+
211
|
1470
|
+
212</pre>
|
1384
1471
|
</td>
|
1385
1472
|
<td>
|
1386
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1473
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 191</span>
|
1387
1474
|
|
1388
1475
|
<span class='kw'>def</span> <span class='id identifier rubyid_filter'>filter</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1389
1476
|
<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>
|
@@ -1458,12 +1545,12 @@
|
|
1458
1545
|
<pre class="lines">
|
1459
1546
|
|
1460
1547
|
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1548
|
+
105
|
1549
|
+
106
|
1550
|
+
107</pre>
|
1464
1551
|
</td>
|
1465
1552
|
<td>
|
1466
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1553
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 105</span>
|
1467
1554
|
|
1468
1555
|
<span class='kw'>def</span> <span class='id identifier rubyid_filter_input_class'>filter_input_class</span><span class='lparen'>(</span><span class='id identifier rubyid_class_str'>class_str</span><span class='rparen'>)</span>
|
1469
1556
|
<span class='ivar'>@filter_input_class</span> <span class='op'>=</span> <span class='id identifier rubyid_class_str'>class_str</span>
|
@@ -1519,12 +1606,12 @@
|
|
1519
1606
|
<pre class="lines">
|
1520
1607
|
|
1521
1608
|
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1609
|
+
119
|
1610
|
+
120
|
1611
|
+
121</pre>
|
1525
1612
|
</td>
|
1526
1613
|
<td>
|
1527
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1614
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 119</span>
|
1528
1615
|
|
1529
1616
|
<span class='kw'>def</span> <span class='id identifier rubyid_filter_item_wrapper_class'>filter_item_wrapper_class</span><span class='lparen'>(</span><span class='id identifier rubyid_class_str'>class_str</span><span class='rparen'>)</span>
|
1530
1617
|
<span class='ivar'>@filter_item_wrapper_class</span> <span class='op'>=</span> <span class='id identifier rubyid_class_str'>class_str</span>
|
@@ -1580,12 +1667,12 @@
|
|
1580
1667
|
<pre class="lines">
|
1581
1668
|
|
1582
1669
|
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1670
|
+
98
|
1671
|
+
99
|
1672
|
+
100</pre>
|
1586
1673
|
</td>
|
1587
1674
|
<td>
|
1588
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1675
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 98</span>
|
1589
1676
|
|
1590
1677
|
<span class='kw'>def</span> <span class='id identifier rubyid_filter_label_class'>filter_label_class</span><span class='lparen'>(</span><span class='id identifier rubyid_class_str'>class_str</span><span class='rparen'>)</span>
|
1591
1678
|
<span class='ivar'>@filter_label_class</span> <span class='op'>=</span> <span class='id identifier rubyid_class_str'>class_str</span>
|
@@ -1641,12 +1728,12 @@
|
|
1641
1728
|
<pre class="lines">
|
1642
1729
|
|
1643
1730
|
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1731
|
+
112
|
1732
|
+
113
|
1733
|
+
114</pre>
|
1647
1734
|
</td>
|
1648
1735
|
<td>
|
1649
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1736
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 112</span>
|
1650
1737
|
|
1651
1738
|
<span class='kw'>def</span> <span class='id identifier rubyid_filter_select_class'>filter_select_class</span><span class='lparen'>(</span><span class='id identifier rubyid_class_str'>class_str</span><span class='rparen'>)</span>
|
1652
1739
|
<span class='ivar'>@filter_select_class</span> <span class='op'>=</span> <span class='id identifier rubyid_class_str'>class_str</span>
|
@@ -1695,12 +1782,12 @@
|
|
1695
1782
|
<pre class="lines">
|
1696
1783
|
|
1697
1784
|
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1785
|
+
392
|
1786
|
+
393
|
1787
|
+
394</pre>
|
1701
1788
|
</td>
|
1702
1789
|
<td>
|
1703
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1790
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 392</span>
|
1704
1791
|
|
1705
1792
|
<span class='kw'>def</span> <span class='id identifier rubyid_filtering_enabled?'>filtering_enabled?</span>
|
1706
1793
|
<span class='ivar'>@filtering</span> <span class='op'>&&</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Ransack</span><span class='rparen'>)</span>
|
@@ -1736,12 +1823,12 @@
|
|
1736
1823
|
<pre class="lines">
|
1737
1824
|
|
1738
1825
|
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1826
|
+
216
|
1827
|
+
217
|
1828
|
+
218</pre>
|
1742
1829
|
</td>
|
1743
1830
|
<td>
|
1744
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1831
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 216</span>
|
1745
1832
|
|
1746
1833
|
<span class='kw'>def</span> <span class='id identifier rubyid_filters'>filters</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_filter_names'>filter_names</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
1747
1834
|
<span class='id identifier rubyid_filter_names'>filter_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_filter_name'>filter_name</span><span class='op'>|</span> <span class='id identifier rubyid_filter'>filter</span><span class='lparen'>(</span><span class='id identifier rubyid_filter_name'>filter_name</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
@@ -1790,12 +1877,12 @@
|
|
1790
1877
|
<pre class="lines">
|
1791
1878
|
|
1792
1879
|
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1880
|
+
412
|
1881
|
+
413
|
1882
|
+
414</pre>
|
1796
1883
|
</td>
|
1797
1884
|
<td>
|
1798
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1885
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 412</span>
|
1799
1886
|
|
1800
1887
|
<span class='kw'>def</span> <span class='id identifier rubyid_pagination_enabled?'>pagination_enabled?</span>
|
1801
1888
|
<span class='ivar'>@pagination</span>
|
@@ -1831,15 +1918,6 @@
|
|
1831
1918
|
<pre class="lines">
|
1832
1919
|
|
1833
1920
|
|
1834
|
-
228
|
1835
|
-
229
|
1836
|
-
230
|
1837
|
-
231
|
1838
|
-
232
|
1839
|
-
233
|
1840
|
-
234
|
1841
|
-
235
|
1842
|
-
236
|
1843
1921
|
237
|
1844
1922
|
238
|
1845
1923
|
239
|
@@ -1860,16 +1938,27 @@
|
|
1860
1938
|
254
|
1861
1939
|
255
|
1862
1940
|
256
|
1863
|
-
257
|
1941
|
+
257
|
1942
|
+
258
|
1943
|
+
259
|
1944
|
+
260
|
1945
|
+
261
|
1946
|
+
262
|
1947
|
+
263
|
1948
|
+
264
|
1949
|
+
265
|
1950
|
+
266
|
1951
|
+
267</pre>
|
1864
1952
|
</td>
|
1865
1953
|
<td>
|
1866
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
1954
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 237</span>
|
1867
1955
|
|
1868
1956
|
<span class='kw'>def</span> <span class='id identifier rubyid_process_data!'>process_data!</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
|
1869
1957
|
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Data was already processed!</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@processed_data</span>
|
1870
1958
|
<span class='comment'># Filtering
|
1871
1959
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_filtering_enabled?'>filtering_enabled?</span>
|
1872
1960
|
<span class='ivar'>@q</span> <span class='op'>=</span> <span class='ivar'>@data</span><span class='period'>.</span><span class='id identifier rubyid_ransack'>ransack</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='id identifier rubyid_param_name'>param_name</span><span class='lparen'>(</span><span class='symbol'>:q</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>auth_object:</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_current_ability'>current_ability</span><span class='comma'>,</span> <span class='label'>search_key:</span> <span class='id identifier rubyid_param_name'>param_name</span><span class='lparen'>(</span><span class='symbol'>:q</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1961
|
+
<span class='ivar'>@q</span><span class='period'>.</span><span class='id identifier rubyid_sorts'>sorts</span> <span class='op'>=</span> <span class='ivar'>@default_sorting</span> <span class='kw'>if</span> <span class='ivar'>@q</span><span class='period'>.</span><span class='id identifier rubyid_sorts'>sorts</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1873
1962
|
<span class='id identifier rubyid_filtered_data'>filtered_data</span> <span class='op'>=</span> <span class='ivar'>@q</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_accessible_by'>accessible_by</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_current_ability'>current_ability</span><span class='rparen'>)</span>
|
1874
1963
|
<span class='kw'>else</span>
|
1875
1964
|
<span class='id identifier rubyid_filtered_data'>filtered_data</span> <span class='op'>=</span> <span class='ivar'>@data</span>
|
@@ -1926,12 +2015,12 @@
|
|
1926
2015
|
<pre class="lines">
|
1927
2016
|
|
1928
2017
|
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
2018
|
+
60
|
2019
|
+
61
|
2020
|
+
62</pre>
|
1932
2021
|
</td>
|
1933
2022
|
<td>
|
1934
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2023
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 60</span>
|
1935
2024
|
|
1936
2025
|
<span class='kw'>def</span> <span class='id identifier rubyid_results_per_page'>results_per_page</span><span class='lparen'>(</span><span class='id identifier rubyid_new_results_per_page'>new_results_per_page</span><span class='rparen'>)</span>
|
1937
2026
|
<span class='ivar'>@results_per_page</span> <span class='op'>=</span> <span class='id identifier rubyid_new_results_per_page'>new_results_per_page</span>
|
@@ -2021,19 +2110,19 @@
|
|
2021
2110
|
<pre class="lines">
|
2022
2111
|
|
2023
2112
|
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2113
|
+
166
|
2114
|
+
167
|
2115
|
+
168
|
2116
|
+
169
|
2117
|
+
170
|
2118
|
+
171
|
2119
|
+
172
|
2120
|
+
173
|
2121
|
+
174
|
2122
|
+
175</pre>
|
2034
2123
|
</td>
|
2035
2124
|
<td>
|
2036
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2125
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 166</span>
|
2037
2126
|
|
2038
2127
|
<span class='kw'>def</span> <span class='id identifier rubyid_row_action'>row_action</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>button_opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
2039
2128
|
<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>
|
@@ -2096,12 +2185,12 @@
|
|
2096
2185
|
<pre class="lines">
|
2097
2186
|
|
2098
2187
|
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2188
|
+
155
|
2189
|
+
156
|
2190
|
+
157</pre>
|
2102
2191
|
</td>
|
2103
2192
|
<td>
|
2104
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2193
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 155</span>
|
2105
2194
|
|
2106
2195
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_column'>skip_column</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
2107
2196
|
<span class='ivar'>@skipped_columns</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>
|
@@ -2137,12 +2226,12 @@
|
|
2137
2226
|
<pre class="lines">
|
2138
2227
|
|
2139
2228
|
|
2140
|
-
|
2141
|
-
|
2142
|
-
|
2229
|
+
66
|
2230
|
+
67
|
2231
|
+
68</pre>
|
2143
2232
|
</td>
|
2144
2233
|
<td>
|
2145
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2234
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 66</span>
|
2146
2235
|
|
2147
2236
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_filtering!'>skip_filtering!</span>
|
2148
2237
|
<span class='ivar'>@filtering</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -2178,12 +2267,12 @@
|
|
2178
2267
|
<pre class="lines">
|
2179
2268
|
|
2180
2269
|
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2270
|
+
54
|
2271
|
+
55
|
2272
|
+
56</pre>
|
2184
2273
|
</td>
|
2185
2274
|
<td>
|
2186
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2275
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 54</span>
|
2187
2276
|
|
2188
2277
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_pagination!'>skip_pagination!</span>
|
2189
2278
|
<span class='ivar'>@pagination</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -2239,12 +2328,12 @@
|
|
2239
2328
|
<pre class="lines">
|
2240
2329
|
|
2241
2330
|
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2331
|
+
180
|
2332
|
+
181
|
2333
|
+
182</pre>
|
2245
2334
|
</td>
|
2246
2335
|
<td>
|
2247
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2336
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 180</span>
|
2248
2337
|
|
2249
2338
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_row_action'>skip_row_action</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
2250
2339
|
<span class='ivar'>@skipped_row_actions</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>
|
@@ -2280,13 +2369,13 @@
|
|
2280
2369
|
<pre class="lines">
|
2281
2370
|
|
2282
2371
|
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2372
|
+
72
|
2373
|
+
73
|
2374
|
+
74
|
2375
|
+
75</pre>
|
2287
2376
|
</td>
|
2288
2377
|
<td>
|
2289
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2378
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 72</span>
|
2290
2379
|
|
2291
2380
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_sorting!'>skip_sorting!</span>
|
2292
2381
|
<span class='ivar'>@sorting_in_filter</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -2323,12 +2412,12 @@
|
|
2323
2412
|
<pre class="lines">
|
2324
2413
|
|
2325
2414
|
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2415
|
+
79
|
2416
|
+
80
|
2417
|
+
81</pre>
|
2329
2418
|
</td>
|
2330
2419
|
<td>
|
2331
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2420
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 79</span>
|
2332
2421
|
|
2333
2422
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_sorting_in_filter!'>skip_sorting_in_filter!</span>
|
2334
2423
|
<span class='ivar'>@sorting_in_filter</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -2364,12 +2453,12 @@
|
|
2364
2453
|
<pre class="lines">
|
2365
2454
|
|
2366
2455
|
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2456
|
+
85
|
2457
|
+
86
|
2458
|
+
87</pre>
|
2370
2459
|
</td>
|
2371
2460
|
<td>
|
2372
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2461
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 85</span>
|
2373
2462
|
|
2374
2463
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_sorting_links!'>skip_sorting_links!</span>
|
2375
2464
|
<span class='ivar'>@sorting_links</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -2443,13 +2532,13 @@
|
|
2443
2532
|
<pre class="lines">
|
2444
2533
|
|
2445
2534
|
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2535
|
+
225
|
2536
|
+
226
|
2537
|
+
227
|
2538
|
+
228</pre>
|
2450
2539
|
</td>
|
2451
2540
|
<td>
|
2452
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2541
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 225</span>
|
2453
2542
|
|
2454
2543
|
<span class='kw'>def</span> <span class='id identifier rubyid_sort'>sort</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>label:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2455
2544
|
<span class='id identifier rubyid_label'>label</span> <span class='op'>||=</span> <span class='id identifier rubyid_data_class'>data_class</span><span class='period'>.</span><span class='id identifier rubyid_fields'>fields</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span>
|
@@ -2499,12 +2588,12 @@
|
|
2499
2588
|
<pre class="lines">
|
2500
2589
|
|
2501
2590
|
|
2502
|
-
|
2503
|
-
|
2504
|
-
|
2591
|
+
397
|
2592
|
+
398
|
2593
|
+
399</pre>
|
2505
2594
|
</td>
|
2506
2595
|
<td>
|
2507
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2596
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 397</span>
|
2508
2597
|
|
2509
2598
|
<span class='kw'>def</span> <span class='id identifier rubyid_sorting_enabled?'>sorting_enabled?</span>
|
2510
2599
|
<span class='lparen'>(</span><span class='ivar'>@sorting_in_filter</span> <span class='op'>||</span> <span class='ivar'>@sorting_links</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Ransack</span><span class='rparen'>)</span>
|
@@ -2553,12 +2642,12 @@
|
|
2553
2642
|
<pre class="lines">
|
2554
2643
|
|
2555
2644
|
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
2645
|
+
402
|
2646
|
+
403
|
2647
|
+
404</pre>
|
2559
2648
|
</td>
|
2560
2649
|
<td>
|
2561
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2650
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 402</span>
|
2562
2651
|
|
2563
2652
|
<span class='kw'>def</span> <span class='id identifier rubyid_sorting_in_filter_enabled?'>sorting_in_filter_enabled?</span>
|
2564
2653
|
<span class='id identifier rubyid_sorting_enabled?'>sorting_enabled?</span> <span class='op'>&&</span> <span class='ivar'>@sorting_in_filter</span>
|
@@ -2594,18 +2683,18 @@
|
|
2594
2683
|
<pre class="lines">
|
2595
2684
|
|
2596
2685
|
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2686
|
+
417
|
2687
|
+
418
|
2688
|
+
419
|
2689
|
+
420
|
2690
|
+
421
|
2691
|
+
422
|
2692
|
+
423
|
2693
|
+
424
|
2694
|
+
425</pre>
|
2606
2695
|
</td>
|
2607
2696
|
<td>
|
2608
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2697
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 417</span>
|
2609
2698
|
|
2610
2699
|
<span class='kw'>def</span> <span class='id identifier rubyid_sorting_in_filter_select_opts'>sorting_in_filter_select_opts</span>
|
2611
2700
|
<span class='ivar'>@sorts</span><span class='period'>.</span><span class='id identifier rubyid_flat_map'>flat_map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sort'>sort</span><span class='op'>|</span>
|
@@ -2660,12 +2749,12 @@
|
|
2660
2749
|
<pre class="lines">
|
2661
2750
|
|
2662
2751
|
|
2663
|
-
|
2664
|
-
|
2665
|
-
|
2752
|
+
407
|
2753
|
+
408
|
2754
|
+
409</pre>
|
2666
2755
|
</td>
|
2667
2756
|
<td>
|
2668
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2757
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 407</span>
|
2669
2758
|
|
2670
2759
|
<span class='kw'>def</span> <span class='id identifier rubyid_sorting_links_enabled?'>sorting_links_enabled?</span>
|
2671
2760
|
<span class='id identifier rubyid_sorting_enabled?'>sorting_enabled?</span> <span class='op'>&&</span> <span class='ivar'>@sorting_links</span>
|
@@ -2701,12 +2790,12 @@
|
|
2701
2790
|
<pre class="lines">
|
2702
2791
|
|
2703
2792
|
|
2704
|
-
|
2705
|
-
|
2706
|
-
|
2793
|
+
232
|
2794
|
+
233
|
2795
|
+
234</pre>
|
2707
2796
|
</td>
|
2708
2797
|
<td>
|
2709
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line
|
2798
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/list.rb', line 232</span>
|
2710
2799
|
|
2711
2800
|
<span class='kw'>def</span> <span class='id identifier rubyid_sorts'>sorts</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_names'>names</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
2712
2801
|
<span class='id identifier rubyid_names'>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_name'>name</span><span class='op'>|</span> <span class='id identifier rubyid_sort'>sort</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
@@ -2721,7 +2810,7 @@
|
|
2721
2810
|
</div>
|
2722
2811
|
|
2723
2812
|
<div id="footer">
|
2724
|
-
Generated on
|
2813
|
+
Generated on Mon Sep 8 14:24:22 2025 by
|
2725
2814
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2726
2815
|
0.9.34 (ruby-3.3.5).
|
2727
2816
|
</div>
|