forest_admin_datasource_toolkit 1.38.2 → 1.38.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e88e1d845dcd213c33e31cb4979b36ebff3c4c524d6fec40cd57b06fe8b1ede8
|
|
4
|
+
data.tar.gz: 66fd7450dbe98a1686213853e4ffa753c0b7d504bb5d209c6550fef7053ff3f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7b20f9261836f63deef6bc758b5128f9c2def8afc5108317951d4dddbf37c97fa373ccecb062562427a4b6e3bb0a234321f63fb536080bd88792f38d0946142
|
|
7
|
+
data.tar.gz: c08b66c06f2f66d004ff1d2f94c161f565fa1feff94f7bfe3f60108e90952ec6cbc412a99a325eace30525175ed8f21f87e4ebf77de97a91eb44ed81c805bacc
|
|
@@ -41,6 +41,12 @@ module ForestAdminDatasourceToolkit
|
|
|
41
41
|
only_keys ? relations.keys : relations
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
def relation_include_paths
|
|
45
|
+
relations.flat_map do |relation, sub_projection|
|
|
46
|
+
[relation, *sub_projection.relation_include_paths.map { |path| "#{relation}.#{path}" }]
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
44
50
|
def nest(prefix: nil)
|
|
45
51
|
prefix ? Projection.new(map { |path| "#{prefix}:#{path}" }) : self
|
|
46
52
|
end
|
|
@@ -22,7 +22,7 @@ module ForestAdminDatasourceToolkit
|
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
else
|
|
25
|
-
prefix, suffix = field.split(':')
|
|
25
|
+
prefix, suffix = field.split(':', 2)
|
|
26
26
|
schema = collection.schema[:fields][prefix]
|
|
27
27
|
|
|
28
28
|
raise Exceptions::ValidationError, "Relation not found: '#{collection.name}.#{prefix}'" if schema.nil?
|
|
@@ -38,7 +38,6 @@ module ForestAdminDatasourceToolkit
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
if schema.type != 'PolymorphicManyToOne'
|
|
41
|
-
suffix = field[dot_index + 1, field.length - dot_index - 1]
|
|
42
41
|
association = collection.datasource.get_collection(schema.foreign_collection)
|
|
43
42
|
validate(association, suffix, values)
|
|
44
43
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_admin_datasource_toolkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.38.
|
|
4
|
+
version: 1.38.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthieu
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-08-
|
|
12
|
+
date: 2026-08-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|