activeadmin-tom_select 4.1.2 → 4.2.0.beta2
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/Appraisals +2 -2
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +146 -102
- data/README.md +1 -1
- data/activeadmin-tom_select.gemspec +1 -0
- data/docs/activeadmin-4-asset-setup.md +171 -0
- data/docs/activeadmin-tailwind-4.md +125 -0
- data/docs/guide-update-your-app.md +89 -356
- data/docs/setup-activeadmin-app.md +69 -492
- data/docs/setup-activeadmin-gem.md +83 -449
- data/gemfiles/rails_7.x_active_admin_4.x.gemfile +2 -1
- data/gemfiles/rails_7.x_active_admin_4.x.gemfile.lock +158 -116
- data/gemfiles/rails_8.x_active_admin_4.x.gemfile +2 -1
- data/gemfiles/rails_8.x_active_admin_4.x.gemfile.lock +145 -101
- data/lib/activeadmin/tom_select/option_collection.rb +4 -6
- data/lib/activeadmin/tom_select/select_input_extension.rb +15 -7
- data/lib/activeadmin/tom_select/version.rb +1 -1
- data/npm-package/package.json +1 -1
- data/spec/features/end_to_end_spec.rb +2 -2
- data/spec/features/input_errors_spec.rb +1 -3
- data/spec/features/options_dsl_spec.rb +6 -6
- data/spec/internal/Gemfile +1 -0
- data/spec/internal/Gemfile.lock +152 -107
- data/spec/internal/app/assets/stylesheets/active_admin.tailwind.css +8 -5
- data/spec/internal/bin/tailwindcss +27 -0
- data/spec/internal/lib/tasks/active_admin.rake +9 -4
- data/spec/internal/package-lock.json +15 -1371
- data/spec/internal/package.json +1 -2
- data/{docs/tailwind-4/tailwind-active_admin.config.js → spec/internal/tailwind-active_admin.config.mjs} +9 -4
- data/spec/internal/yarn.lock +128 -728
- metadata +21 -23
- data/docs/activeadmin-4-detailed-reference.md +0 -932
- data/docs/activeadmin-4-gem-migration-guide.md +0 -313
- data/docs/combustion.md +0 -213
- data/docs/fail.png +0 -0
- data/docs/normal.png +0 -0
- data/docs/propshaft-readme.md +0 -320
- data/docs/propshaft-upgrade.md +0 -484
- data/docs/tailwind/blog-page.md +0 -341
- data/docs/tailwind/upgrade-guide-enhanced.md +0 -438
- data/docs/tailwind/upgrade-guide.md +0 -416
- data/docs/tailwind-4/active_admin.rake +0 -38
- data/docs/tailwind-4/active_admin.tailwind.css +0 -415
- data/docs/test-app-change.md +0 -154
- data/docs/test-environment-fixes.md +0 -58
- data/docs/update-tom-select.md +0 -348
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
activeadmin-tom_select (4.
|
|
4
|
+
activeadmin-tom_select (4.2.0.beta2)
|
|
5
5
|
activeadmin (>= 3.0, < 5)
|
|
6
6
|
ransack (>= 1.8, < 5)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
action_text-trix (2.1.15)
|
|
12
|
+
railties
|
|
13
|
+
actioncable (8.1.1)
|
|
14
|
+
actionpack (= 8.1.1)
|
|
15
|
+
activesupport (= 8.1.1)
|
|
14
16
|
nio4r (~> 2.0)
|
|
15
17
|
websocket-driver (>= 0.6.1)
|
|
16
18
|
zeitwerk (~> 2.6)
|
|
17
|
-
actionmailbox (8.
|
|
18
|
-
actionpack (= 8.
|
|
19
|
-
activejob (= 8.
|
|
20
|
-
activerecord (= 8.
|
|
21
|
-
activestorage (= 8.
|
|
22
|
-
activesupport (= 8.
|
|
19
|
+
actionmailbox (8.1.1)
|
|
20
|
+
actionpack (= 8.1.1)
|
|
21
|
+
activejob (= 8.1.1)
|
|
22
|
+
activerecord (= 8.1.1)
|
|
23
|
+
activestorage (= 8.1.1)
|
|
24
|
+
activesupport (= 8.1.1)
|
|
23
25
|
mail (>= 2.8.0)
|
|
24
|
-
actionmailer (8.
|
|
25
|
-
actionpack (= 8.
|
|
26
|
-
actionview (= 8.
|
|
27
|
-
activejob (= 8.
|
|
28
|
-
activesupport (= 8.
|
|
26
|
+
actionmailer (8.1.1)
|
|
27
|
+
actionpack (= 8.1.1)
|
|
28
|
+
actionview (= 8.1.1)
|
|
29
|
+
activejob (= 8.1.1)
|
|
30
|
+
activesupport (= 8.1.1)
|
|
29
31
|
mail (>= 2.8.0)
|
|
30
32
|
rails-dom-testing (~> 2.2)
|
|
31
|
-
actionpack (8.
|
|
32
|
-
actionview (= 8.
|
|
33
|
-
activesupport (= 8.
|
|
33
|
+
actionpack (8.1.1)
|
|
34
|
+
actionview (= 8.1.1)
|
|
35
|
+
activesupport (= 8.1.1)
|
|
34
36
|
nokogiri (>= 1.8.5)
|
|
35
37
|
rack (>= 2.2.4)
|
|
36
38
|
rack-session (>= 1.0.1)
|
|
@@ -38,20 +40,21 @@ GEM
|
|
|
38
40
|
rails-dom-testing (~> 2.2)
|
|
39
41
|
rails-html-sanitizer (~> 1.6)
|
|
40
42
|
useragent (~> 0.16)
|
|
41
|
-
actiontext (8.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
actiontext (8.1.1)
|
|
44
|
+
action_text-trix (~> 2.1.15)
|
|
45
|
+
actionpack (= 8.1.1)
|
|
46
|
+
activerecord (= 8.1.1)
|
|
47
|
+
activestorage (= 8.1.1)
|
|
48
|
+
activesupport (= 8.1.1)
|
|
46
49
|
globalid (>= 0.6.0)
|
|
47
50
|
nokogiri (>= 1.8.5)
|
|
48
|
-
actionview (8.
|
|
49
|
-
activesupport (= 8.
|
|
51
|
+
actionview (8.1.1)
|
|
52
|
+
activesupport (= 8.1.1)
|
|
50
53
|
builder (~> 3.1)
|
|
51
54
|
erubi (~> 1.11)
|
|
52
55
|
rails-dom-testing (~> 2.2)
|
|
53
56
|
rails-html-sanitizer (~> 1.6)
|
|
54
|
-
activeadmin (4.0.0.
|
|
57
|
+
activeadmin (4.0.0.beta19)
|
|
55
58
|
arbre (~> 2.0)
|
|
56
59
|
csv
|
|
57
60
|
formtastic (>= 5.0)
|
|
@@ -60,47 +63,46 @@ GEM
|
|
|
60
63
|
kaminari (>= 1.2.1)
|
|
61
64
|
railties (>= 7.0)
|
|
62
65
|
ransack (>= 4.0)
|
|
63
|
-
activejob (8.
|
|
64
|
-
activesupport (= 8.
|
|
66
|
+
activejob (8.1.1)
|
|
67
|
+
activesupport (= 8.1.1)
|
|
65
68
|
globalid (>= 0.3.6)
|
|
66
|
-
activemodel (8.
|
|
67
|
-
activesupport (= 8.
|
|
68
|
-
activerecord (8.
|
|
69
|
-
activemodel (= 8.
|
|
70
|
-
activesupport (= 8.
|
|
69
|
+
activemodel (8.1.1)
|
|
70
|
+
activesupport (= 8.1.1)
|
|
71
|
+
activerecord (8.1.1)
|
|
72
|
+
activemodel (= 8.1.1)
|
|
73
|
+
activesupport (= 8.1.1)
|
|
71
74
|
timeout (>= 0.4.0)
|
|
72
|
-
activestorage (8.
|
|
73
|
-
actionpack (= 8.
|
|
74
|
-
activejob (= 8.
|
|
75
|
-
activerecord (= 8.
|
|
76
|
-
activesupport (= 8.
|
|
75
|
+
activestorage (8.1.1)
|
|
76
|
+
actionpack (= 8.1.1)
|
|
77
|
+
activejob (= 8.1.1)
|
|
78
|
+
activerecord (= 8.1.1)
|
|
79
|
+
activesupport (= 8.1.1)
|
|
77
80
|
marcel (~> 1.0)
|
|
78
|
-
activesupport (8.
|
|
81
|
+
activesupport (8.1.1)
|
|
79
82
|
base64
|
|
80
|
-
benchmark (>= 0.3)
|
|
81
83
|
bigdecimal
|
|
82
84
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
83
85
|
connection_pool (>= 2.2.5)
|
|
84
86
|
drb
|
|
85
87
|
i18n (>= 1.6, < 2)
|
|
88
|
+
json
|
|
86
89
|
logger (>= 1.4.2)
|
|
87
90
|
minitest (>= 5.1)
|
|
88
91
|
securerandom (>= 0.3)
|
|
89
92
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
90
93
|
uri (>= 0.13.1)
|
|
91
|
-
addressable (2.8.
|
|
92
|
-
public_suffix (>= 2.0.2, <
|
|
94
|
+
addressable (2.8.8)
|
|
95
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
93
96
|
appraisal (2.5.0)
|
|
94
97
|
bundler
|
|
95
98
|
rake
|
|
96
99
|
thor (>= 0.14.0)
|
|
97
|
-
arbre (2.2.
|
|
100
|
+
arbre (2.2.1)
|
|
98
101
|
activesupport (>= 7.0)
|
|
99
102
|
ast (2.4.3)
|
|
100
103
|
base64 (0.3.0)
|
|
101
104
|
bcrypt (3.1.20)
|
|
102
|
-
|
|
103
|
-
bigdecimal (3.2.3)
|
|
105
|
+
bigdecimal (4.0.1)
|
|
104
106
|
builder (3.3.0)
|
|
105
107
|
capybara (3.40.0)
|
|
106
108
|
addressable
|
|
@@ -119,15 +121,15 @@ GEM
|
|
|
119
121
|
activesupport (>= 3.0.0)
|
|
120
122
|
railties (>= 3.0.0)
|
|
121
123
|
thor (>= 0.14.6)
|
|
122
|
-
concurrent-ruby (1.3.
|
|
123
|
-
connection_pool (
|
|
124
|
+
concurrent-ruby (1.3.6)
|
|
125
|
+
connection_pool (3.0.2)
|
|
124
126
|
crass (1.0.6)
|
|
125
127
|
csv (3.3.5)
|
|
126
128
|
database_cleaner-active_record (2.2.2)
|
|
127
129
|
activerecord (>= 5.a)
|
|
128
130
|
database_cleaner-core (~> 2.0)
|
|
129
131
|
database_cleaner-core (2.0.1)
|
|
130
|
-
date (3.
|
|
132
|
+
date (3.5.1)
|
|
131
133
|
devise (4.9.4)
|
|
132
134
|
bcrypt (~> 3.0)
|
|
133
135
|
orm_adapter (~> 0.1)
|
|
@@ -137,16 +139,16 @@ GEM
|
|
|
137
139
|
diff-lcs (1.6.2)
|
|
138
140
|
docile (1.4.1)
|
|
139
141
|
drb (2.2.3)
|
|
140
|
-
erb (
|
|
142
|
+
erb (6.0.1)
|
|
141
143
|
erubi (1.13.1)
|
|
142
144
|
formtastic (5.0.0)
|
|
143
145
|
actionpack (>= 6.0.0)
|
|
144
146
|
formtastic_i18n (0.7.0)
|
|
145
147
|
globalid (1.3.0)
|
|
146
148
|
activesupport (>= 6.1)
|
|
147
|
-
has_scope (0.
|
|
148
|
-
actionpack (>=
|
|
149
|
-
activesupport (>=
|
|
149
|
+
has_scope (0.9.0)
|
|
150
|
+
actionpack (>= 7.0)
|
|
151
|
+
activesupport (>= 7.0)
|
|
150
152
|
i18n (1.14.7)
|
|
151
153
|
concurrent-ruby (~> 1.0)
|
|
152
154
|
inherited_resources (2.1.0)
|
|
@@ -154,12 +156,12 @@ GEM
|
|
|
154
156
|
has_scope (>= 0.6)
|
|
155
157
|
railties (>= 7.0)
|
|
156
158
|
responders (>= 2)
|
|
157
|
-
io-console (0.8.
|
|
158
|
-
irb (1.
|
|
159
|
+
io-console (0.8.2)
|
|
160
|
+
irb (1.16.0)
|
|
159
161
|
pp (>= 0.6.0)
|
|
160
162
|
rdoc (>= 4.0.0)
|
|
161
163
|
reline (>= 0.4.2)
|
|
162
|
-
json (2.
|
|
164
|
+
json (2.18.0)
|
|
163
165
|
kaminari (1.2.2)
|
|
164
166
|
activesupport (>= 4.1.0)
|
|
165
167
|
kaminari-actionview (= 1.2.2)
|
|
@@ -175,10 +177,11 @@ GEM
|
|
|
175
177
|
language_server-protocol (3.17.0.5)
|
|
176
178
|
lint_roller (1.1.0)
|
|
177
179
|
logger (1.7.0)
|
|
178
|
-
loofah (2.
|
|
180
|
+
loofah (2.25.0)
|
|
179
181
|
crass (~> 1.0.2)
|
|
180
182
|
nokogiri (>= 1.12.0)
|
|
181
|
-
mail (2.
|
|
183
|
+
mail (2.9.0)
|
|
184
|
+
logger
|
|
182
185
|
mini_mime (>= 0.1.1)
|
|
183
186
|
net-imap
|
|
184
187
|
net-pop
|
|
@@ -190,8 +193,9 @@ GEM
|
|
|
190
193
|
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
191
194
|
mime-types-data (3.2025.0924)
|
|
192
195
|
mini_mime (1.1.5)
|
|
193
|
-
minitest (
|
|
194
|
-
|
|
196
|
+
minitest (6.0.0)
|
|
197
|
+
prism (~> 1.5)
|
|
198
|
+
net-imap (0.6.2)
|
|
195
199
|
date
|
|
196
200
|
net-protocol
|
|
197
201
|
net-pop (0.1.2)
|
|
@@ -200,54 +204,68 @@ GEM
|
|
|
200
204
|
timeout
|
|
201
205
|
net-smtp (0.5.1)
|
|
202
206
|
net-protocol
|
|
203
|
-
nio4r (2.7.
|
|
207
|
+
nio4r (2.7.5)
|
|
208
|
+
nokogiri (1.18.10-aarch64-linux-gnu)
|
|
209
|
+
racc (~> 1.4)
|
|
210
|
+
nokogiri (1.18.10-aarch64-linux-musl)
|
|
211
|
+
racc (~> 1.4)
|
|
212
|
+
nokogiri (1.18.10-arm-linux-gnu)
|
|
213
|
+
racc (~> 1.4)
|
|
214
|
+
nokogiri (1.18.10-arm-linux-musl)
|
|
215
|
+
racc (~> 1.4)
|
|
216
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
217
|
+
racc (~> 1.4)
|
|
218
|
+
nokogiri (1.18.10-x86_64-darwin)
|
|
219
|
+
racc (~> 1.4)
|
|
204
220
|
nokogiri (1.18.10-x86_64-linux-gnu)
|
|
205
221
|
racc (~> 1.4)
|
|
222
|
+
nokogiri (1.18.10-x86_64-linux-musl)
|
|
223
|
+
racc (~> 1.4)
|
|
206
224
|
orm_adapter (0.5.0)
|
|
207
225
|
parallel (1.27.0)
|
|
208
|
-
parser (3.3.
|
|
226
|
+
parser (3.3.10.0)
|
|
209
227
|
ast (~> 2.4.1)
|
|
210
228
|
racc
|
|
211
|
-
playwright-ruby-client (1.
|
|
229
|
+
playwright-ruby-client (1.57.0)
|
|
212
230
|
concurrent-ruby (>= 1.1.6)
|
|
213
231
|
mime-types (>= 3.0)
|
|
214
|
-
pp (0.6.
|
|
232
|
+
pp (0.6.3)
|
|
215
233
|
prettyprint
|
|
216
234
|
prettyprint (0.2.0)
|
|
217
|
-
prism (1.
|
|
235
|
+
prism (1.7.0)
|
|
218
236
|
propshaft (1.3.1)
|
|
219
237
|
actionpack (>= 7.0.0)
|
|
220
238
|
activesupport (>= 7.0.0)
|
|
221
239
|
rack
|
|
222
|
-
psych (5.
|
|
240
|
+
psych (5.3.1)
|
|
223
241
|
date
|
|
224
242
|
stringio
|
|
225
|
-
public_suffix (
|
|
243
|
+
public_suffix (7.0.0)
|
|
226
244
|
puma (6.6.1)
|
|
227
245
|
nio4r (~> 2.0)
|
|
228
246
|
racc (1.8.1)
|
|
229
|
-
rack (3.2.
|
|
247
|
+
rack (3.2.4)
|
|
230
248
|
rack-session (2.1.1)
|
|
231
249
|
base64 (>= 0.1.0)
|
|
232
250
|
rack (>= 3.0.0)
|
|
233
251
|
rack-test (2.2.0)
|
|
234
252
|
rack (>= 1.3)
|
|
235
|
-
rackup (2.
|
|
253
|
+
rackup (2.3.1)
|
|
236
254
|
rack (>= 3)
|
|
237
|
-
rails (8.
|
|
238
|
-
actioncable (= 8.
|
|
239
|
-
actionmailbox (= 8.
|
|
240
|
-
actionmailer (= 8.
|
|
241
|
-
actionpack (= 8.
|
|
242
|
-
actiontext (= 8.
|
|
243
|
-
actionview (= 8.
|
|
244
|
-
activejob (= 8.
|
|
245
|
-
activemodel (= 8.
|
|
246
|
-
activerecord (= 8.
|
|
247
|
-
activestorage (= 8.
|
|
248
|
-
activesupport (= 8.
|
|
255
|
+
rails (8.1.1)
|
|
256
|
+
actioncable (= 8.1.1)
|
|
257
|
+
actionmailbox (= 8.1.1)
|
|
258
|
+
actionmailer (= 8.1.1)
|
|
259
|
+
actionpack (= 8.1.1)
|
|
260
|
+
actiontext (= 8.1.1)
|
|
261
|
+
actionview (= 8.1.1)
|
|
262
|
+
activejob (= 8.1.1)
|
|
263
|
+
activemodel (= 8.1.1)
|
|
264
|
+
activerecord (= 8.1.1)
|
|
265
|
+
activestorage (= 8.1.1)
|
|
266
|
+
activesupport (= 8.1.1)
|
|
249
267
|
bundler (>= 1.15.0)
|
|
250
|
-
railties (= 8.
|
|
268
|
+
railties (= 8.1.1)
|
|
251
269
|
rails-dom-testing (2.3.0)
|
|
252
270
|
activesupport (>= 5.0.0)
|
|
253
271
|
minitest
|
|
@@ -255,9 +273,9 @@ GEM
|
|
|
255
273
|
rails-html-sanitizer (1.6.2)
|
|
256
274
|
loofah (~> 2.21)
|
|
257
275
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
258
|
-
railties (8.
|
|
259
|
-
actionpack (= 8.
|
|
260
|
-
activesupport (= 8.
|
|
276
|
+
railties (8.1.1)
|
|
277
|
+
actionpack (= 8.1.1)
|
|
278
|
+
activesupport (= 8.1.1)
|
|
261
279
|
irb (~> 1.13)
|
|
262
280
|
rackup (>= 1.0.0)
|
|
263
281
|
rake (>= 12.2)
|
|
@@ -265,26 +283,27 @@ GEM
|
|
|
265
283
|
tsort (>= 0.2)
|
|
266
284
|
zeitwerk (~> 2.6)
|
|
267
285
|
rainbow (3.1.1)
|
|
268
|
-
rake (13.3.
|
|
286
|
+
rake (13.3.1)
|
|
269
287
|
ransack (4.4.1)
|
|
270
288
|
activerecord (>= 7.2)
|
|
271
289
|
activesupport (>= 7.2)
|
|
272
290
|
i18n
|
|
273
|
-
rdoc (
|
|
291
|
+
rdoc (7.0.1)
|
|
274
292
|
erb
|
|
275
293
|
psych (>= 4.0.0)
|
|
294
|
+
tsort
|
|
276
295
|
regexp_parser (2.11.3)
|
|
277
|
-
reline (0.6.
|
|
296
|
+
reline (0.6.3)
|
|
278
297
|
io-console (~> 0.5)
|
|
279
|
-
responders (3.
|
|
280
|
-
actionpack (>=
|
|
281
|
-
railties (>=
|
|
282
|
-
rspec-core (3.13.
|
|
298
|
+
responders (3.2.0)
|
|
299
|
+
actionpack (>= 7.0)
|
|
300
|
+
railties (>= 7.0)
|
|
301
|
+
rspec-core (3.13.6)
|
|
283
302
|
rspec-support (~> 3.13.0)
|
|
284
303
|
rspec-expectations (3.13.5)
|
|
285
304
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
286
305
|
rspec-support (~> 3.13.0)
|
|
287
|
-
rspec-mocks (3.13.
|
|
306
|
+
rspec-mocks (3.13.7)
|
|
288
307
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
289
308
|
rspec-support (~> 3.13.0)
|
|
290
309
|
rspec-rails (6.1.5)
|
|
@@ -323,17 +342,34 @@ GEM
|
|
|
323
342
|
simplecov_json_formatter (~> 0.1)
|
|
324
343
|
simplecov-html (0.13.2)
|
|
325
344
|
simplecov_json_formatter (0.1.4)
|
|
326
|
-
sqlite3 (2.
|
|
327
|
-
|
|
345
|
+
sqlite3 (2.8.1-aarch64-linux-gnu)
|
|
346
|
+
sqlite3 (2.8.1-aarch64-linux-musl)
|
|
347
|
+
sqlite3 (2.8.1-arm-linux-gnu)
|
|
348
|
+
sqlite3 (2.8.1-arm-linux-musl)
|
|
349
|
+
sqlite3 (2.8.1-arm64-darwin)
|
|
350
|
+
sqlite3 (2.8.1-x86_64-darwin)
|
|
351
|
+
sqlite3 (2.8.1-x86_64-linux-gnu)
|
|
352
|
+
sqlite3 (2.8.1-x86_64-linux-musl)
|
|
353
|
+
stringio (3.2.0)
|
|
354
|
+
tailwindcss-rails (4.4.0)
|
|
355
|
+
railties (>= 7.0.0)
|
|
356
|
+
tailwindcss-ruby (~> 4.0)
|
|
357
|
+
tailwindcss-ruby (4.1.18)
|
|
358
|
+
tailwindcss-ruby (4.1.18-aarch64-linux-gnu)
|
|
359
|
+
tailwindcss-ruby (4.1.18-aarch64-linux-musl)
|
|
360
|
+
tailwindcss-ruby (4.1.18-arm64-darwin)
|
|
361
|
+
tailwindcss-ruby (4.1.18-x86_64-darwin)
|
|
362
|
+
tailwindcss-ruby (4.1.18-x86_64-linux-gnu)
|
|
363
|
+
tailwindcss-ruby (4.1.18-x86_64-linux-musl)
|
|
328
364
|
thor (1.4.0)
|
|
329
|
-
timeout (0.
|
|
365
|
+
timeout (0.6.0)
|
|
330
366
|
tsort (0.2.0)
|
|
331
367
|
tzinfo (2.0.6)
|
|
332
368
|
concurrent-ruby (~> 1.0)
|
|
333
369
|
unicode-display_width (3.2.0)
|
|
334
370
|
unicode-emoji (~> 4.1)
|
|
335
|
-
unicode-emoji (4.
|
|
336
|
-
uri (1.
|
|
371
|
+
unicode-emoji (4.2.0)
|
|
372
|
+
uri (1.1.1)
|
|
337
373
|
useragent (0.16.11)
|
|
338
374
|
warden (1.2.9)
|
|
339
375
|
rack (>= 2.0.9)
|
|
@@ -343,13 +379,20 @@ GEM
|
|
|
343
379
|
websocket-extensions (0.1.5)
|
|
344
380
|
xpath (3.2.0)
|
|
345
381
|
nokogiri (~> 1.8)
|
|
346
|
-
zeitwerk (2.7.
|
|
382
|
+
zeitwerk (2.7.4)
|
|
347
383
|
|
|
348
384
|
PLATFORMS
|
|
349
|
-
|
|
385
|
+
aarch64-linux-gnu
|
|
386
|
+
aarch64-linux-musl
|
|
387
|
+
arm-linux-gnu
|
|
388
|
+
arm-linux-musl
|
|
389
|
+
arm64-darwin
|
|
390
|
+
x86_64-darwin
|
|
391
|
+
x86_64-linux-gnu
|
|
392
|
+
x86_64-linux-musl
|
|
350
393
|
|
|
351
394
|
DEPENDENCIES
|
|
352
|
-
activeadmin (= 4.0.0.
|
|
395
|
+
activeadmin (= 4.0.0.beta19)
|
|
353
396
|
activeadmin-tom_select!
|
|
354
397
|
appraisal (~> 2.2)
|
|
355
398
|
bundler (>= 1.5, < 3)
|
|
@@ -369,6 +412,7 @@ DEPENDENCIES
|
|
|
369
412
|
rubocop-rspec (~> 3.0)
|
|
370
413
|
simplecov
|
|
371
414
|
sqlite3 (~> 2.1)
|
|
415
|
+
tailwindcss-rails (~> 4.4.0)
|
|
372
416
|
|
|
373
417
|
BUNDLED WITH
|
|
374
|
-
2.
|
|
418
|
+
2.6.7
|
|
@@ -88,9 +88,8 @@ module ActiveAdmin
|
|
|
88
88
|
def extract_display_text_option(options)
|
|
89
89
|
options.fetch(:display_text) do
|
|
90
90
|
text_attribute = options.fetch(:text_attribute) do
|
|
91
|
-
raise('Missing option:
|
|
92
|
-
'
|
|
93
|
-
'or set the text_attribute option.')
|
|
91
|
+
raise('Missing option: text_attribute. ' \
|
|
92
|
+
'Pass the name of the attribute to use for display text.')
|
|
94
93
|
end
|
|
95
94
|
|
|
96
95
|
->(record) { record.send(text_attribute) }
|
|
@@ -100,9 +99,8 @@ module ActiveAdmin
|
|
|
100
99
|
def extract_filter_option(options)
|
|
101
100
|
options.fetch(:filter) do
|
|
102
101
|
text_attribute = options.fetch(:text_attribute) do
|
|
103
|
-
raise('Missing option:
|
|
104
|
-
'
|
|
105
|
-
'or set the text_attribute option to apply a default Ransack filter.')
|
|
102
|
+
raise('Missing option: text_attribute. ' \
|
|
103
|
+
'Pass the name of the attribute to use for filtering.')
|
|
106
104
|
end
|
|
107
105
|
|
|
108
106
|
->(term, scope) { scope.ransack("#{text_attribute}_cont" => term).result }
|
|
@@ -31,10 +31,11 @@ module ActiveAdmin
|
|
|
31
31
|
def to_html
|
|
32
32
|
super
|
|
33
33
|
rescue RuntimeError => e
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
# Display helpful error message
|
|
35
|
+
error_html = e.message.gsub("\n", '<br>').html_safe
|
|
36
|
+
error_style = 'color: red; padding: 10px; background: #fee; ' \
|
|
37
|
+
'border: 1px solid #fcc; border-radius: 4px; margin: 5px 0;'
|
|
38
|
+
template.content_tag(:div, error_html, class: 'searchable-select-error', style: error_style)
|
|
38
39
|
end
|
|
39
40
|
|
|
40
41
|
# @api private
|
|
@@ -135,12 +136,19 @@ module ActiveAdmin
|
|
|
135
136
|
option_collection.scope(template, path_params.merge(ajax_params))
|
|
136
137
|
end
|
|
137
138
|
|
|
138
|
-
def option_collection
|
|
139
|
+
def option_collection # rubocop:disable Metrics/MethodLength
|
|
139
140
|
ajax_resource
|
|
140
141
|
.searchable_select_option_collections
|
|
141
142
|
.fetch(ajax_option_collection_name) do
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
model_name = ajax_resource_class.name
|
|
144
|
+
raise('The required ajax endpoint is missing. ' \
|
|
145
|
+
"Add `searchable_select_options` to the '#{model_name}' admin resource:\n\n " \
|
|
146
|
+
"ActiveAdmin.register #{model_name} do\n " \
|
|
147
|
+
"searchable_select_options(scope: #{model_name},\n " \
|
|
148
|
+
"text_attribute: :name) # or :title, :email, etc.\n " \
|
|
149
|
+
"end\n\n" \
|
|
150
|
+
"Or disable ajax mode for this input:\n " \
|
|
151
|
+
"f.input :#{method}, as: :searchable_select, ajax: false")
|
|
144
152
|
end
|
|
145
153
|
end
|
|
146
154
|
|
data/npm-package/package.json
CHANGED
|
@@ -194,9 +194,9 @@ RSpec.describe 'end to end', type: :feature, js: true do
|
|
|
194
194
|
scroll_select_box_list
|
|
195
195
|
wait_for_ajax
|
|
196
196
|
|
|
197
|
-
# Default page size is 10, scrolling might load
|
|
197
|
+
# Default page size is 10, scrolling might load more pages
|
|
198
198
|
expect(select_box_items.size).to be >= 10
|
|
199
|
-
expect(select_box_items.size).to be <=
|
|
199
|
+
expect(select_box_items.size).to be <= 20
|
|
200
200
|
end
|
|
201
201
|
end
|
|
202
202
|
|
|
@@ -38,9 +38,7 @@ RSpec.describe 'searchable select', type: :feature do
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
visit '/admin/test_error_post2s'
|
|
41
|
-
expect(page).to have_content(
|
|
42
|
-
"No option collection named 'nonexistent_collection' defined in 'Category' admin."
|
|
43
|
-
)
|
|
41
|
+
expect(page).to have_content('The required ajax endpoint is missing')
|
|
44
42
|
end
|
|
45
43
|
|
|
46
44
|
it 'shows helpful error message if ajax resource does not have an admin' do
|
|
@@ -192,7 +192,7 @@ RSpec.describe 'searchable_select_options dsl', type: :request do
|
|
|
192
192
|
expect(json_response).to include(results: array_including(a_hash_including(text: 'A post')))
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
-
it '
|
|
195
|
+
it 'raises error when scope option is missing' do
|
|
196
196
|
expect do
|
|
197
197
|
ActiveAdminHelpers.setup do
|
|
198
198
|
ActiveAdmin.register(Post) do
|
|
@@ -202,7 +202,7 @@ RSpec.describe 'searchable_select_options dsl', type: :request do
|
|
|
202
202
|
end.to raise_error(/Missing option: scope/)
|
|
203
203
|
end
|
|
204
204
|
|
|
205
|
-
it '
|
|
205
|
+
it 'raises error when display_text and text_attribute are missing' do
|
|
206
206
|
expect do
|
|
207
207
|
ActiveAdminHelpers.setup do
|
|
208
208
|
ActiveAdmin.register(Post) do
|
|
@@ -210,18 +210,18 @@ RSpec.describe 'searchable_select_options dsl', type: :request do
|
|
|
210
210
|
filter: ->(_term, scope) { scope })
|
|
211
211
|
end
|
|
212
212
|
end
|
|
213
|
-
end.to raise_error(/Missing option:
|
|
213
|
+
end.to raise_error(/Missing option: text_attribute/)
|
|
214
214
|
end
|
|
215
215
|
|
|
216
|
-
it '
|
|
216
|
+
it 'raises error when filter and text_attribute are missing' do
|
|
217
217
|
expect do
|
|
218
218
|
ActiveAdminHelpers.setup do
|
|
219
219
|
ActiveAdmin.register(Post) do
|
|
220
220
|
searchable_select_options(scope: Post,
|
|
221
|
-
display_text: ->(
|
|
221
|
+
display_text: ->(record) { record.title }) # rubocop:disable Style/SymbolProc
|
|
222
222
|
end
|
|
223
223
|
end
|
|
224
|
-
end.to raise_error(/Missing option:
|
|
224
|
+
end.to raise_error(/Missing option: text_attribute/)
|
|
225
225
|
end
|
|
226
226
|
|
|
227
227
|
def json_response
|
data/spec/internal/Gemfile
CHANGED