forest_admin_datasource_customizer 1.25.2 → 1.25.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: 4e0706b830e98bf27dbe5e17a9b973d5537fd700b029557950b12cbfb940d191
|
|
4
|
+
data.tar.gz: 2cc9c2ea9feec24de1e18a19d08f2c7105aebeb40d82d3e1f5931e5dd0d24b8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9706fee045e8f5ad76b019078132fccd5fce78ef0c99520fdb9328d6f5d18c7668922a8e2c2f51e0b59b0dd3ca333a2cd76dc79dc5c2fd9d2a6bad57a5615f1
|
|
7
|
+
data.tar.gz: 2cce1807d410a98f368c53969f242ccfa472ba398462fc3e041ee6bff51917c830b739685fac6bd5b6e60933797f6d65ba3de6ee2683616e156d7102fd11012f
|
data/lib/forest_admin_datasource_customizer/decorators/search/search_collection_decorator.rb
CHANGED
|
@@ -5,6 +5,9 @@ module ForestAdminDatasourceCustomizer
|
|
|
5
5
|
include ForestAdminDatasourceToolkit::Schema
|
|
6
6
|
include ForestAdminDatasourceToolkit::Components::Query::ConditionTree
|
|
7
7
|
|
|
8
|
+
POLYMORPHIC_TYPES = %w[PolymorphicManyToOne PolymorphicOneToOne].freeze
|
|
9
|
+
TO_ONE_RELATIONS = %w[ManyToOne OneToOne].freeze
|
|
10
|
+
|
|
8
11
|
def initialize(child_collection, datasource)
|
|
9
12
|
super
|
|
10
13
|
@replacer = nil
|
|
@@ -112,7 +115,7 @@ module ForestAdminDatasourceCustomizer
|
|
|
112
115
|
@child_collection.schema[:fields].each do |name, field|
|
|
113
116
|
fields.push([name, field]) if field.type == 'Column' && searchable_field?(field)
|
|
114
117
|
|
|
115
|
-
if field.type
|
|
118
|
+
if POLYMORPHIC_TYPES.include?(field.type) && extended
|
|
116
119
|
ForestAdminAgent::Facades::Container.logger.log(
|
|
117
120
|
'Debug',
|
|
118
121
|
"We're not searching through #{self.name}.#{name} because it's a polymorphic relation. " \
|
|
@@ -121,8 +124,7 @@ module ForestAdminDatasourceCustomizer
|
|
|
121
124
|
)
|
|
122
125
|
end
|
|
123
126
|
|
|
124
|
-
|
|
125
|
-
next unless extended && to_one_relations.include?(field.type)
|
|
127
|
+
next unless extended && TO_ONE_RELATIONS.include?(field.type)
|
|
126
128
|
|
|
127
129
|
related = @child_collection.datasource.get_collection(field.foreign_collection)
|
|
128
130
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_admin_datasource_customizer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.25.
|
|
4
|
+
version: 1.25.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-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|