avo 2.38.0 → 2.39.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/avo/fields/base_field.rb +22 -10
- data/lib/avo/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: babf1d23e5b710f7a868e3cf92a6c93cf38dab521ce56fcac29da0e81cf3fb4a
|
4
|
+
data.tar.gz: 0b09066f69c8d9bc60e08ef539e1bd3c447f1b982e704e282d1f40ae7b753b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8195af9c52ef84949af28140a1e490814bc4b90c093cc1a472fc81f15177fd029ef77530c31a19256ad43eaf423d8e6a8b81368410ed54367deb63969c2ff6f7
|
7
|
+
data.tar.gz: 534e22265c6b513c97df4e9166749b1f60800b84354ca43f667120fe26505f3b51b84d4ff4badeebe546cfe7f2280cb526658f37370d2888a17ae2803abee8d0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (2.
|
4
|
+
avo (2.39.0)
|
5
5
|
actionview (>= 6.0)
|
6
6
|
active_link_to
|
7
7
|
activerecord (>= 6.0)
|
@@ -256,7 +256,7 @@ GEM
|
|
256
256
|
mini_magick (4.12.0)
|
257
257
|
mini_mime (1.1.2)
|
258
258
|
mini_portile2 (2.8.2)
|
259
|
-
minitest (5.
|
259
|
+
minitest (5.19.0)
|
260
260
|
msgpack (1.5.6)
|
261
261
|
multi_xml (0.6.0)
|
262
262
|
net-imap (0.3.6)
|
@@ -328,9 +328,9 @@ GEM
|
|
328
328
|
thor (~> 1.0)
|
329
329
|
rainbow (3.1.1)
|
330
330
|
rake (13.0.6)
|
331
|
-
ransack (
|
332
|
-
activerecord (>= 6.
|
333
|
-
activesupport (>= 6.
|
331
|
+
ransack (4.0.0)
|
332
|
+
activerecord (>= 6.1.5)
|
333
|
+
activesupport (>= 6.1.5)
|
334
334
|
i18n
|
335
335
|
rb-fsevent (0.11.2)
|
336
336
|
rb-inotify (0.10.1)
|
@@ -446,7 +446,7 @@ GEM
|
|
446
446
|
websocket-extensions (0.1.5)
|
447
447
|
xpath (3.2.0)
|
448
448
|
nokogiri (~> 1.8)
|
449
|
-
zeitwerk (2.6.
|
449
|
+
zeitwerk (2.6.11)
|
450
450
|
|
451
451
|
PLATFORMS
|
452
452
|
ruby
|
@@ -524,4 +524,4 @@ DEPENDENCIES
|
|
524
524
|
zeitwerk
|
525
525
|
|
526
526
|
BUNDLED WITH
|
527
|
-
2.
|
527
|
+
2.4.12
|
@@ -186,7 +186,17 @@ module Avo
|
|
186
186
|
|
187
187
|
if @format_using.present?
|
188
188
|
# Apply the changes in the
|
189
|
-
Avo::ExecutionContext.new(
|
189
|
+
Avo::ExecutionContext.new(
|
190
|
+
target: @format_using,
|
191
|
+
model: model,
|
192
|
+
key: property,
|
193
|
+
value: final_value,
|
194
|
+
resource: resource,
|
195
|
+
view: view,
|
196
|
+
field: self,
|
197
|
+
delegate_missing_to: :view_context,
|
198
|
+
include: self.class.included_modules
|
199
|
+
).handle
|
190
200
|
else
|
191
201
|
final_value
|
192
202
|
end
|
@@ -206,7 +216,15 @@ module Avo
|
|
206
216
|
end
|
207
217
|
|
208
218
|
def update_using(model, key, value, params)
|
209
|
-
Avo::ExecutionContext.new(
|
219
|
+
Avo::ExecutionContext.new(
|
220
|
+
target: @update_using,
|
221
|
+
model: model,
|
222
|
+
key: key,
|
223
|
+
value: value,
|
224
|
+
resource: resource,
|
225
|
+
field: self,
|
226
|
+
include: self.class.included_modules
|
227
|
+
).handle
|
210
228
|
end
|
211
229
|
|
212
230
|
# Try to see if the field has a different database ID than it's name
|
@@ -246,9 +264,7 @@ module Avo
|
|
246
264
|
end
|
247
265
|
|
248
266
|
def model_errors
|
249
|
-
|
250
|
-
|
251
|
-
model.errors
|
267
|
+
model.nil? ? {} : model.errors
|
252
268
|
end
|
253
269
|
|
254
270
|
def type
|
@@ -285,11 +301,7 @@ module Avo
|
|
285
301
|
private
|
286
302
|
|
287
303
|
def model_or_class(model)
|
288
|
-
|
289
|
-
"class"
|
290
|
-
else
|
291
|
-
"model"
|
292
|
-
end
|
304
|
+
model.instance_of?(String) ? "class" : "model"
|
293
305
|
end
|
294
306
|
|
295
307
|
def is_model?(model)
|
data/lib/avo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.39.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-08-
|
12
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|