forest_liana 9.4.2 → 9.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/forest_liana/resources_getter.rb +11 -1
- data/lib/forest_liana/collection.rb +1 -1
- data/lib/forest_liana/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: 8b885316fe632fd50cfd305569a4e00832b2b01943b1a17a5b3f5899e5a4bb4d
|
4
|
+
data.tar.gz: 8fa11052397369fea66f2d7b9b60e4f660ef04ba87f9633197b9809458ab83b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f8a7629dadbee8e5b5555c42f5c6c0d57ba5bce6321829040734a48812fd08eca907cb71a95fc2ed7edbf41e0372af78ad532290197be65d871769c61b51741
|
7
|
+
data.tar.gz: ee69715cd0b3031c653ff38a1fc2468a91f62b1e74619bf68394dd1c9cfd879fb6eace52f69738580e0aa9a6f58764fe263e0673c5ad307479f426245070798d
|
@@ -166,7 +166,17 @@ module ForestLiana
|
|
166
166
|
def self.related_data_params(attributes, user)
|
167
167
|
parent_model = SchemaUtils.find_model_from_collection_name(attributes[:parent_collection_name])
|
168
168
|
model = parent_model.reflect_on_association(attributes[:parent_association_name].to_sym)
|
169
|
-
|
169
|
+
|
170
|
+
[
|
171
|
+
parent_model,
|
172
|
+
model,
|
173
|
+
attributes.merge(
|
174
|
+
collection: attributes[:parent_collection_name],
|
175
|
+
id: attributes[:parent_collection_id],
|
176
|
+
association_name: attributes[:parent_association_name]
|
177
|
+
),
|
178
|
+
user
|
179
|
+
]
|
170
180
|
end
|
171
181
|
|
172
182
|
def self.fetch_ids(resources_getter)
|
@@ -72,12 +72,12 @@ module ForestLiana::Collection
|
|
72
72
|
opts[:relationships] = nil unless opts.has_key?(:relationships)
|
73
73
|
opts[:widget] = nil unless opts.has_key?(:widget)
|
74
74
|
opts[:validations] = [] unless opts.has_key?(:validations)
|
75
|
+
opts[:is_virtual] = true unless opts.has_key?(:polymorphic_key) && opts[:polymorphic_key]
|
75
76
|
|
76
77
|
model.fields << opts.merge({
|
77
78
|
field: name,
|
78
79
|
is_filterable: !!opts[:is_filterable],
|
79
80
|
is_sortable: !!opts[:is_sortable],
|
80
|
-
is_virtual: true
|
81
81
|
})
|
82
82
|
|
83
83
|
define_method(name) { self.data[name] } if smart_collection?
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|