phlexi-field 0.0.8 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/gemfiles/default.gemfile.lock +56 -52
- data/gemfiles/rails_7.gemfile.lock +37 -39
- data/lib/phlexi/field/options/inferred_types.rb +5 -0
- data/lib/phlexi/field/structure/namespace.rb +4 -4
- data/lib/phlexi/field/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82bf54723c7aa5b5cf138599d6ce79e1dcc0b71a02bbf5e0fd8b5ccc2123a89f
|
4
|
+
data.tar.gz: e6ab56335c7e8e7b42e5928e2bea9d15297162bd7abbb3b132ef64647c73dc20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz: '
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a17272249d4a4a3ba48a27e903eb3ed6983dcd0c00d5f44de041ceda489d632218faf93937e3ea85d44313a8f99b7551d3d99b929f2f085b802475fa74e8b3'
|
7
|
+
data.tar.gz: 1f7565b42970c88604cac3b624f03ad06a8fdedcba60886d008d248bef6a49fa522e6ef94fd5b85f92e504f8a7eada97f0e2023558abfaab09eccf0907f391a7
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Phlexi::Form is a flexible and powerful form builder for Ruby applications. It provides a more customizable and extensible way to create forms compared to traditional form helpers.
|
4
4
|
|
5
|
-
[![Ruby](https://github.com/radioactive-labs/phlexi-
|
5
|
+
[![Ruby](https://github.com/radioactive-labs/phlexi-field/actions/workflows/main.yml/badge.svg)](https://github.com/radioactive-labs/phlexi-field/actions/workflows/main.yml)
|
6
6
|
|
7
7
|
## Features
|
8
8
|
|
@@ -20,7 +20,7 @@ Phlexi::Form is a flexible and powerful form builder for Ruby applications. It p
|
|
20
20
|
Add this line to your application's Gemfile:
|
21
21
|
|
22
22
|
```ruby
|
23
|
-
gem 'phlexi-
|
23
|
+
gem 'phlexi-field'
|
24
24
|
```
|
25
25
|
|
26
26
|
And then execute:
|
@@ -32,7 +32,7 @@ $ bundle install
|
|
32
32
|
Or install it yourself as:
|
33
33
|
|
34
34
|
```
|
35
|
-
$ gem install phlexi-
|
35
|
+
$ gem install phlexi-field
|
36
36
|
```
|
37
37
|
|
38
38
|
## Usage
|
@@ -189,7 +189,7 @@ end
|
|
189
189
|
|
190
190
|
## Contributing
|
191
191
|
|
192
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/radioactive-labs/phlexi-
|
192
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/radioactive-labs/phlexi-field.
|
193
193
|
|
194
194
|
## License
|
195
195
|
|
@@ -1,40 +1,44 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
phlexi-
|
4
|
+
phlexi-field (0.0.9)
|
5
5
|
activesupport
|
6
|
+
fiber-local
|
6
7
|
phlex (~> 1.11)
|
7
8
|
zeitwerk
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
actionpack (7.
|
13
|
-
actionview (= 7.
|
14
|
-
activesupport (= 7.
|
13
|
+
actionpack (7.2.2)
|
14
|
+
actionview (= 7.2.2)
|
15
|
+
activesupport (= 7.2.2)
|
15
16
|
nokogiri (>= 1.8.5)
|
16
17
|
racc
|
17
|
-
rack (>= 2.2.4)
|
18
|
+
rack (>= 2.2.4, < 3.2)
|
18
19
|
rack-session (>= 1.0.1)
|
19
20
|
rack-test (>= 0.6.3)
|
20
21
|
rails-dom-testing (~> 2.2)
|
21
22
|
rails-html-sanitizer (~> 1.6)
|
22
|
-
|
23
|
-
|
23
|
+
useragent (~> 0.16)
|
24
|
+
actionview (7.2.2)
|
25
|
+
activesupport (= 7.2.2)
|
24
26
|
builder (~> 3.1)
|
25
27
|
erubi (~> 1.11)
|
26
28
|
rails-dom-testing (~> 2.2)
|
27
29
|
rails-html-sanitizer (~> 1.6)
|
28
|
-
activesupport (7.
|
30
|
+
activesupport (7.2.2)
|
29
31
|
base64
|
32
|
+
benchmark (>= 0.3)
|
30
33
|
bigdecimal
|
31
|
-
concurrent-ruby (~> 1.0, >= 1.
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
32
35
|
connection_pool (>= 2.2.5)
|
33
36
|
drb
|
34
37
|
i18n (>= 1.6, < 2)
|
38
|
+
logger (>= 1.4.2)
|
35
39
|
minitest (>= 5.1)
|
36
|
-
|
37
|
-
tzinfo (~> 2.0)
|
40
|
+
securerandom (>= 0.3)
|
41
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
38
42
|
addressable (2.8.7)
|
39
43
|
public_suffix (>= 2.0.2, < 7.0)
|
40
44
|
ansi (1.5.0)
|
@@ -44,11 +48,12 @@ GEM
|
|
44
48
|
thor (>= 0.14.0)
|
45
49
|
ast (2.4.2)
|
46
50
|
base64 (0.2.0)
|
51
|
+
benchmark (0.3.0)
|
47
52
|
bigdecimal (3.1.8)
|
48
53
|
builder (3.3.0)
|
49
54
|
bundle-audit (0.1.0)
|
50
55
|
bundler-audit
|
51
|
-
bundler-audit (0.9.
|
56
|
+
bundler-audit (0.9.2)
|
52
57
|
bundler (>= 1.2.0, < 3)
|
53
58
|
thor (~> 1.0)
|
54
59
|
capybara (3.40.0)
|
@@ -64,54 +69,56 @@ GEM
|
|
64
69
|
activesupport (>= 3.0.0)
|
65
70
|
railties (>= 3.0.0)
|
66
71
|
thor (>= 0.14.6)
|
67
|
-
concurrent-ruby (1.3.
|
72
|
+
concurrent-ruby (1.3.4)
|
68
73
|
connection_pool (2.4.1)
|
69
74
|
crass (1.0.6)
|
70
75
|
drb (2.2.1)
|
71
76
|
erubi (1.13.0)
|
72
|
-
|
77
|
+
fiber-local (1.1.0)
|
78
|
+
fiber-storage
|
79
|
+
fiber-storage (1.0.0)
|
80
|
+
i18n (1.14.6)
|
73
81
|
concurrent-ruby (~> 1.0)
|
74
82
|
io-console (0.7.2)
|
75
|
-
irb (1.14.
|
83
|
+
irb (1.14.1)
|
76
84
|
rdoc (>= 4.0.0)
|
77
85
|
reline (>= 0.4.2)
|
78
|
-
json (2.7.
|
86
|
+
json (2.7.6)
|
79
87
|
language_server-protocol (3.17.0.3)
|
80
88
|
lint_roller (1.1.0)
|
81
|
-
|
89
|
+
logger (1.6.1)
|
90
|
+
loofah (2.23.1)
|
82
91
|
crass (~> 1.0.2)
|
83
92
|
nokogiri (>= 1.12.0)
|
84
93
|
matrix (0.4.2)
|
85
94
|
mini_mime (1.1.5)
|
86
|
-
minitest (5.
|
95
|
+
minitest (5.25.1)
|
87
96
|
minitest-reporters (1.7.1)
|
88
97
|
ansi
|
89
98
|
builder
|
90
99
|
minitest (>= 5.0)
|
91
100
|
ruby-progressbar
|
92
|
-
|
93
|
-
nokogiri (1.16.7-x86_64-darwin)
|
101
|
+
nokogiri (1.16.7-arm64-darwin)
|
94
102
|
racc (~> 1.4)
|
95
|
-
parallel (1.
|
96
|
-
parser (3.3.
|
103
|
+
parallel (1.26.3)
|
104
|
+
parser (3.3.6.0)
|
97
105
|
ast (~> 2.4.1)
|
98
106
|
racc
|
99
107
|
phlex (1.11.0)
|
100
108
|
phlex-testing-capybara (0.1.0)
|
101
109
|
capybara (~> 3.38)
|
102
110
|
phlex (>= 0.5)
|
103
|
-
psych (5.
|
111
|
+
psych (5.2.0)
|
104
112
|
stringio
|
105
113
|
public_suffix (6.0.1)
|
106
114
|
racc (1.8.1)
|
107
|
-
rack (3.1.
|
115
|
+
rack (3.1.8)
|
108
116
|
rack-session (2.0.0)
|
109
117
|
rack (>= 3.0.0)
|
110
118
|
rack-test (2.1.0)
|
111
119
|
rack (>= 1.3)
|
112
|
-
rackup (2.
|
120
|
+
rackup (2.2.0)
|
113
121
|
rack (>= 3)
|
114
|
-
webrick (~> 1.8)
|
115
122
|
rails-dom-testing (2.2.0)
|
116
123
|
activesupport (>= 5.0.0)
|
117
124
|
minitest
|
@@ -119,10 +126,10 @@ GEM
|
|
119
126
|
rails-html-sanitizer (1.6.0)
|
120
127
|
loofah (~> 2.21)
|
121
128
|
nokogiri (~> 1.14)
|
122
|
-
railties (7.
|
123
|
-
actionpack (= 7.
|
124
|
-
activesupport (= 7.
|
125
|
-
irb
|
129
|
+
railties (7.2.2)
|
130
|
+
actionpack (= 7.2.2)
|
131
|
+
activesupport (= 7.2.2)
|
132
|
+
irb (~> 1.13)
|
126
133
|
rackup (>= 1.0.0)
|
127
134
|
rake (>= 12.2)
|
128
135
|
thor (~> 1.0, >= 1.2.2)
|
@@ -132,52 +139,49 @@ GEM
|
|
132
139
|
rdoc (6.7.0)
|
133
140
|
psych (>= 4.0.0)
|
134
141
|
regexp_parser (2.9.2)
|
135
|
-
reline (0.5.
|
142
|
+
reline (0.5.11)
|
136
143
|
io-console (~> 0.5)
|
137
|
-
|
138
|
-
strscan
|
139
|
-
rubocop (1.64.1)
|
144
|
+
rubocop (1.66.1)
|
140
145
|
json (~> 2.3)
|
141
146
|
language_server-protocol (>= 3.17.0)
|
142
147
|
parallel (~> 1.10)
|
143
148
|
parser (>= 3.3.0.2)
|
144
149
|
rainbow (>= 2.2.2, < 4.0)
|
145
|
-
regexp_parser (>=
|
146
|
-
|
147
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
150
|
+
regexp_parser (>= 2.4, < 3.0)
|
151
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
148
152
|
ruby-progressbar (~> 1.7)
|
149
153
|
unicode-display_width (>= 2.4.0, < 3.0)
|
150
|
-
rubocop-ast (1.
|
154
|
+
rubocop-ast (1.34.0)
|
151
155
|
parser (>= 3.3.1.0)
|
152
|
-
rubocop-performance (1.
|
156
|
+
rubocop-performance (1.22.1)
|
153
157
|
rubocop (>= 1.48.1, < 2.0)
|
154
158
|
rubocop-ast (>= 1.31.1, < 2.0)
|
155
159
|
ruby-progressbar (1.13.0)
|
156
|
-
|
160
|
+
securerandom (0.3.1)
|
161
|
+
standard (1.41.1)
|
157
162
|
language_server-protocol (~> 3.17.0.2)
|
158
163
|
lint_roller (~> 1.0)
|
159
|
-
rubocop (~> 1.
|
164
|
+
rubocop (~> 1.66.0)
|
160
165
|
standard-custom (~> 1.0.0)
|
161
|
-
standard-performance (~> 1.
|
166
|
+
standard-performance (~> 1.5)
|
162
167
|
standard-custom (1.0.2)
|
163
168
|
lint_roller (~> 1.0)
|
164
169
|
rubocop (~> 1.50)
|
165
|
-
standard-performance (1.
|
170
|
+
standard-performance (1.5.0)
|
166
171
|
lint_roller (~> 1.1)
|
167
|
-
rubocop-performance (~> 1.
|
168
|
-
stringio (3.1.
|
169
|
-
|
170
|
-
thor (1.3.1)
|
172
|
+
rubocop-performance (~> 1.22.0)
|
173
|
+
stringio (3.1.2)
|
174
|
+
thor (1.3.2)
|
171
175
|
tzinfo (2.0.6)
|
172
176
|
concurrent-ruby (~> 1.0)
|
173
|
-
unicode-display_width (2.
|
174
|
-
|
177
|
+
unicode-display_width (2.6.0)
|
178
|
+
useragent (0.16.10)
|
175
179
|
xpath (3.2.0)
|
176
180
|
nokogiri (~> 1.8)
|
177
|
-
zeitwerk (2.
|
181
|
+
zeitwerk (2.7.1)
|
178
182
|
|
179
183
|
PLATFORMS
|
180
|
-
|
184
|
+
arm64-darwin
|
181
185
|
|
182
186
|
DEPENDENCIES
|
183
187
|
appraisal
|
@@ -186,7 +190,7 @@ DEPENDENCIES
|
|
186
190
|
minitest
|
187
191
|
minitest-reporters
|
188
192
|
phlex-testing-capybara
|
189
|
-
phlexi-
|
193
|
+
phlexi-field!
|
190
194
|
rake
|
191
195
|
standard
|
192
196
|
|
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
phlexi-
|
4
|
+
phlexi-field (0.0.9)
|
5
5
|
activesupport
|
6
|
+
fiber-local
|
6
7
|
phlex (~> 1.11)
|
7
8
|
zeitwerk
|
8
9
|
|
@@ -96,7 +97,7 @@ GEM
|
|
96
97
|
builder (3.3.0)
|
97
98
|
bundle-audit (0.1.0)
|
98
99
|
bundler-audit
|
99
|
-
bundler-audit (0.9.
|
100
|
+
bundler-audit (0.9.2)
|
100
101
|
bundler (>= 1.2.0, < 3)
|
101
102
|
thor (~> 1.0)
|
102
103
|
capybara (3.40.0)
|
@@ -112,24 +113,27 @@ GEM
|
|
112
113
|
activesupport (>= 3.0.0)
|
113
114
|
railties (>= 3.0.0)
|
114
115
|
thor (>= 0.14.6)
|
115
|
-
concurrent-ruby (1.3.
|
116
|
+
concurrent-ruby (1.3.4)
|
116
117
|
connection_pool (2.4.1)
|
117
118
|
crass (1.0.6)
|
118
119
|
date (3.3.4)
|
119
120
|
drb (2.2.1)
|
120
121
|
erubi (1.13.0)
|
122
|
+
fiber-local (1.1.0)
|
123
|
+
fiber-storage
|
124
|
+
fiber-storage (1.0.0)
|
121
125
|
globalid (1.2.1)
|
122
126
|
activesupport (>= 6.1)
|
123
|
-
i18n (1.14.
|
127
|
+
i18n (1.14.6)
|
124
128
|
concurrent-ruby (~> 1.0)
|
125
129
|
io-console (0.7.2)
|
126
|
-
irb (1.14.
|
130
|
+
irb (1.14.1)
|
127
131
|
rdoc (>= 4.0.0)
|
128
132
|
reline (>= 0.4.2)
|
129
|
-
json (2.7.
|
133
|
+
json (2.7.6)
|
130
134
|
language_server-protocol (3.17.0.3)
|
131
135
|
lint_roller (1.1.0)
|
132
|
-
loofah (2.
|
136
|
+
loofah (2.23.1)
|
133
137
|
crass (~> 1.0.2)
|
134
138
|
nokogiri (>= 1.12.0)
|
135
139
|
mail (2.8.1)
|
@@ -140,14 +144,14 @@ GEM
|
|
140
144
|
marcel (1.0.4)
|
141
145
|
matrix (0.4.2)
|
142
146
|
mini_mime (1.1.5)
|
143
|
-
minitest (5.
|
147
|
+
minitest (5.25.1)
|
144
148
|
minitest-reporters (1.7.1)
|
145
149
|
ansi
|
146
150
|
builder
|
147
151
|
minitest (>= 5.0)
|
148
152
|
ruby-progressbar
|
149
153
|
mutex_m (0.2.0)
|
150
|
-
net-imap (0.
|
154
|
+
net-imap (0.5.0)
|
151
155
|
date
|
152
156
|
net-protocol
|
153
157
|
net-pop (0.1.2)
|
@@ -157,28 +161,27 @@ GEM
|
|
157
161
|
net-smtp (0.5.0)
|
158
162
|
net-protocol
|
159
163
|
nio4r (2.7.3)
|
160
|
-
nokogiri (1.16.7-
|
164
|
+
nokogiri (1.16.7-arm64-darwin)
|
161
165
|
racc (~> 1.4)
|
162
|
-
parallel (1.
|
163
|
-
parser (3.3.
|
166
|
+
parallel (1.26.3)
|
167
|
+
parser (3.3.6.0)
|
164
168
|
ast (~> 2.4.1)
|
165
169
|
racc
|
166
170
|
phlex (1.11.0)
|
167
171
|
phlex-testing-capybara (0.1.0)
|
168
172
|
capybara (~> 3.38)
|
169
173
|
phlex (>= 0.5)
|
170
|
-
psych (5.
|
174
|
+
psych (5.2.0)
|
171
175
|
stringio
|
172
176
|
public_suffix (6.0.1)
|
173
177
|
racc (1.8.1)
|
174
|
-
rack (3.1.
|
178
|
+
rack (3.1.8)
|
175
179
|
rack-session (2.0.0)
|
176
180
|
rack (>= 3.0.0)
|
177
181
|
rack-test (2.1.0)
|
178
182
|
rack (>= 1.3)
|
179
|
-
rackup (2.
|
183
|
+
rackup (2.2.0)
|
180
184
|
rack (>= 3)
|
181
|
-
webrick (~> 1.8)
|
182
185
|
rails (7.1.3.4)
|
183
186
|
actioncable (= 7.1.3.4)
|
184
187
|
actionmailbox (= 7.1.3.4)
|
@@ -213,57 +216,52 @@ GEM
|
|
213
216
|
rdoc (6.7.0)
|
214
217
|
psych (>= 4.0.0)
|
215
218
|
regexp_parser (2.9.2)
|
216
|
-
reline (0.5.
|
219
|
+
reline (0.5.11)
|
217
220
|
io-console (~> 0.5)
|
218
|
-
|
219
|
-
strscan
|
220
|
-
rubocop (1.64.1)
|
221
|
+
rubocop (1.66.1)
|
221
222
|
json (~> 2.3)
|
222
223
|
language_server-protocol (>= 3.17.0)
|
223
224
|
parallel (~> 1.10)
|
224
225
|
parser (>= 3.3.0.2)
|
225
226
|
rainbow (>= 2.2.2, < 4.0)
|
226
|
-
regexp_parser (>=
|
227
|
-
|
228
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
227
|
+
regexp_parser (>= 2.4, < 3.0)
|
228
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
229
229
|
ruby-progressbar (~> 1.7)
|
230
230
|
unicode-display_width (>= 2.4.0, < 3.0)
|
231
|
-
rubocop-ast (1.
|
231
|
+
rubocop-ast (1.34.0)
|
232
232
|
parser (>= 3.3.1.0)
|
233
|
-
rubocop-performance (1.
|
233
|
+
rubocop-performance (1.22.1)
|
234
234
|
rubocop (>= 1.48.1, < 2.0)
|
235
235
|
rubocop-ast (>= 1.31.1, < 2.0)
|
236
236
|
ruby-progressbar (1.13.0)
|
237
|
-
sqlite3 (1.7.3-
|
238
|
-
standard (1.
|
237
|
+
sqlite3 (1.7.3-arm64-darwin)
|
238
|
+
standard (1.41.1)
|
239
239
|
language_server-protocol (~> 3.17.0.2)
|
240
240
|
lint_roller (~> 1.0)
|
241
|
-
rubocop (~> 1.
|
241
|
+
rubocop (~> 1.66.0)
|
242
242
|
standard-custom (~> 1.0.0)
|
243
|
-
standard-performance (~> 1.
|
243
|
+
standard-performance (~> 1.5)
|
244
244
|
standard-custom (1.0.2)
|
245
245
|
lint_roller (~> 1.0)
|
246
246
|
rubocop (~> 1.50)
|
247
|
-
standard-performance (1.
|
247
|
+
standard-performance (1.5.0)
|
248
248
|
lint_roller (~> 1.1)
|
249
|
-
rubocop-performance (~> 1.
|
250
|
-
stringio (3.1.
|
251
|
-
|
252
|
-
thor (1.3.1)
|
249
|
+
rubocop-performance (~> 1.22.0)
|
250
|
+
stringio (3.1.2)
|
251
|
+
thor (1.3.2)
|
253
252
|
timeout (0.4.1)
|
254
253
|
tzinfo (2.0.6)
|
255
254
|
concurrent-ruby (~> 1.0)
|
256
|
-
unicode-display_width (2.
|
257
|
-
webrick (1.8.1)
|
255
|
+
unicode-display_width (2.6.0)
|
258
256
|
websocket-driver (0.7.6)
|
259
257
|
websocket-extensions (>= 0.1.0)
|
260
258
|
websocket-extensions (0.1.5)
|
261
259
|
xpath (3.2.0)
|
262
260
|
nokogiri (~> 1.8)
|
263
|
-
zeitwerk (2.
|
261
|
+
zeitwerk (2.7.1)
|
264
262
|
|
265
263
|
PLATFORMS
|
266
|
-
|
264
|
+
arm64-darwin
|
267
265
|
|
268
266
|
DEPENDENCIES
|
269
267
|
appraisal
|
@@ -272,7 +270,7 @@ DEPENDENCIES
|
|
272
270
|
minitest
|
273
271
|
minitest-reporters
|
274
272
|
phlex-testing-capybara
|
275
|
-
phlexi-
|
273
|
+
phlexi-field!
|
276
274
|
rails (~> 7.1.3, >= 7.1.3.4)
|
277
275
|
rake
|
278
276
|
sqlite3 (~> 1.4)
|
@@ -25,6 +25,11 @@ module Phlexi
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def infer_field_type
|
28
|
+
if object.class.respond_to?(:rich_text_association_names) &&
|
29
|
+
object.class.rich_text_association_names.include?(:"rich_text_#{key}")
|
30
|
+
return :rich_text
|
31
|
+
end
|
32
|
+
|
28
33
|
# Check attachments first since they are implemented as associations
|
29
34
|
return :attachment if attachment_reflection
|
30
35
|
|
@@ -51,8 +51,8 @@ module Phlexi
|
|
51
51
|
# end
|
52
52
|
# end
|
53
53
|
# ```
|
54
|
-
def nest_one(key, object: nil,
|
55
|
-
object ||= object_value_for(key: key)
|
54
|
+
def nest_one(key, as: nil, object: nil, default: nil, template: false, &)
|
55
|
+
object ||= object_value_for(key: key) || default
|
56
56
|
key = as || key
|
57
57
|
create_child(key, self.class, object:, template:, builder_klass:, &)
|
58
58
|
end
|
@@ -73,8 +73,8 @@ module Phlexi
|
|
73
73
|
# ```
|
74
74
|
# The object within the block is a `Namespace` object that maps each object within the enumerable
|
75
75
|
# to another `Namespace` or `Field`.
|
76
|
-
def nest_many(key, collection: nil,
|
77
|
-
collection ||= Array(object_value_for(key: key))
|
76
|
+
def nest_many(key, as: nil, collection: nil, default: nil, template: false, &)
|
77
|
+
collection ||= Array(object_value_for(key: key)).presence || default
|
78
78
|
key = as || key
|
79
79
|
create_child(key, self.class::NamespaceCollection, collection:, template:, &)
|
80
80
|
end
|
data/lib/phlexi/field/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlexi-field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Froelich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex
|