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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30304717828c9052079569a8d955913fb634760dded796df1135fe826831e62b
4
- data.tar.gz: 57ce0d28c56e813ea44eab5a8ac7f98e50bc4733b43fd48a2fa3828f4eabe65e
3
+ metadata.gz: 8b885316fe632fd50cfd305569a4e00832b2b01943b1a17a5b3f5899e5a4bb4d
4
+ data.tar.gz: 8fa11052397369fea66f2d7b9b60e4f660ef04ba87f9633197b9809458ab83b1
5
5
  SHA512:
6
- metadata.gz: abe0a8db51a9015fa7f73ed62b815c5f7e282cb720169395358d9055c05bd36320268c65951504873bb1767630d5ebf5266725a67563b350f43fe014555f90d8
7
- data.tar.gz: d2969b08d6810fa39985663f879099b224c41c65d7282cbb0b81813c205b5857c6400c82e744d55eb2d55f0e882670eeb2435e5eb649790498bc25fe984b743f
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
- [parent_model, model, attributes.merge(collection: attributes[:parent_collection_name]), user]
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?
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "9.4.2"
2
+ VERSION = "9.5.0"
3
3
  end
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.2
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-10-30 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails