forest_admin_datasource_active_record 1.0.0.pre.beta.23 → 1.0.0.pre.beta.24
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e8066d5c92b8c29a1af80b8abf88f7f619eeb22c101a45aab964dd4b1c8d5c
|
4
|
+
data.tar.gz: bcdf8bbc3b7b45f0488317c56b9058b6becf7a1a93e7aa0f5609f7cbdf362ff0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6369edf2a171a44f5ae77474531cbe2d7943b1d12253e423dfc5353e01daacfa22a3f5870d5cc732624329f81c814115056be130c3b2a694bd7f11eaf7449eee
|
7
|
+
data.tar.gz: 8a91c54e1aecc09faa1dfe38dae73fb40849d73093ad46c99d0b74ea47008ca28a2053147367917a8931fd57364b659caa3f553900f52ffd9aa2569638ca4a89
|
@@ -75,7 +75,7 @@ module ForestAdminDatasourceActiveRecord
|
|
75
75
|
unless @projection.nil?
|
76
76
|
@select += @projection.columns.map { |field| "#{@collection.model.table_name}.#{field}" }
|
77
77
|
@projection.relations.each_key do |relation|
|
78
|
-
relation_schema = @collection.fields[relation]
|
78
|
+
relation_schema = @collection.schema[:fields][relation]
|
79
79
|
@select << if relation_schema.type == 'OneToOne'
|
80
80
|
"#{@collection.model.table_name}.#{relation_schema.origin_key_target}"
|
81
81
|
else
|
@@ -116,8 +116,8 @@ module ForestAdminDatasourceActiveRecord
|
|
116
116
|
def format_field(field)
|
117
117
|
if field.include?(':')
|
118
118
|
relation_name, field = field.split(':')
|
119
|
-
relation = @collection.fields[relation_name]
|
120
|
-
table_name = @collection.datasource.
|
119
|
+
relation = @collection.schema[:fields][relation_name]
|
120
|
+
table_name = @collection.datasource.get_collection(relation.foreign_collection).model.table_name
|
121
121
|
add_join_relation(relation, relation_name)
|
122
122
|
return "#{table_name}.#{field}"
|
123
123
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_datasource_active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.24
|
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: 2023-12-
|
12
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|