forest_admin_datasource_toolkit 1.26.2 → 1.26.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: 315cda199f2c47fd70624c8ce08761982a32a3df0fa5e73bedce70ecc0be48a4
|
|
4
|
+
data.tar.gz: eb0d4321d208aebb64e0d0f5ae6a41bf6c9d1d6965961c45b622a116a996d12e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b17fe95a78aa6c62a56518a8ef56ba775cfaf0775e8cac7070ee972c969a184831cdaefcaac9857cf906a7101a5b1bfd4a2e19bb3334a5d35d61c5cc51589c7
|
|
7
|
+
data.tar.gz: 3c33fadb9b23443ac03ab69388bca159f1f3e99df4d8b57123aa8de0dd33bda52ed6e7d7a722b7ccb54adce06c30803713267324579c6a14109f57acb7e66eee
|
|
@@ -191,15 +191,27 @@ module ForestAdminDatasourceToolkit
|
|
|
191
191
|
end
|
|
192
192
|
|
|
193
193
|
def self.add_polymorphic_condition(conditions, relation)
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
194
|
+
if relation.respond_to?(:origin_type_field) &&
|
|
195
|
+
relation.origin_type_field &&
|
|
196
|
+
relation.origin_type_value
|
|
197
|
+
conditions << Nodes::ConditionTreeLeaf.new(
|
|
198
|
+
relation.origin_type_field,
|
|
199
|
+
Operators::EQUAL,
|
|
200
|
+
relation.origin_type_value
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if relation.respond_to?(:foreign_type_field) &&
|
|
205
|
+
relation.foreign_type_field &&
|
|
206
|
+
relation.foreign_type_value
|
|
207
|
+
conditions << Nodes::ConditionTreeLeaf.new(
|
|
208
|
+
relation.foreign_type_field,
|
|
209
|
+
Operators::EQUAL,
|
|
210
|
+
relation.foreign_type_value
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
conditions
|
|
203
215
|
end
|
|
204
216
|
end
|
|
205
217
|
end
|
|
@@ -3,7 +3,7 @@ module ForestAdminDatasourceToolkit
|
|
|
3
3
|
module Relations
|
|
4
4
|
class ManyToManySchema < RelationSchema
|
|
5
5
|
attr_accessor :origin_key, :through_collection, :foreign_key, :origin_key_target, :foreign_key_target,
|
|
6
|
-
:origin_type_field, :origin_type_value
|
|
6
|
+
:origin_type_field, :origin_type_value, :foreign_type_field, :foreign_type_value
|
|
7
7
|
|
|
8
8
|
def initialize(
|
|
9
9
|
origin_key:,
|
|
@@ -13,7 +13,9 @@ module ForestAdminDatasourceToolkit
|
|
|
13
13
|
foreign_collection:,
|
|
14
14
|
through_collection:,
|
|
15
15
|
origin_type_field: nil,
|
|
16
|
-
origin_type_value: nil
|
|
16
|
+
origin_type_value: nil,
|
|
17
|
+
foreign_type_field: nil,
|
|
18
|
+
foreign_type_value: nil
|
|
17
19
|
)
|
|
18
20
|
super(foreign_collection, 'ManyToMany')
|
|
19
21
|
@origin_key = origin_key
|
|
@@ -23,6 +25,8 @@ module ForestAdminDatasourceToolkit
|
|
|
23
25
|
@foreign_key_target = foreign_key_target
|
|
24
26
|
@origin_type_field = origin_type_field
|
|
25
27
|
@origin_type_value = origin_type_value
|
|
28
|
+
@foreign_type_field = foreign_type_field
|
|
29
|
+
@foreign_type_value = foreign_type_value
|
|
26
30
|
end
|
|
27
31
|
end
|
|
28
32
|
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.26.
|
|
4
|
+
version: 1.26.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-03-
|
|
12
|
+
date: 2026-03-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|