effective_resources 2.26.2 → 2.26.4
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: 8507812d45368ac596afd480886b529006507dc363a574e05aacefccce2a8b18
|
4
|
+
data.tar.gz: 1dd9dd8273cc3a74e797864ecd597afac57bad4c6bc0b774f969e25e74de007b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a7f41b89fb809d0a8bea628fc12105e6b5702b3d5a749ae34983c620141f51dc7fff213b03cd2dcfaf458107f578c2ab5a37bbc6de6bc9c09c952e022902413
|
7
|
+
data.tar.gz: 0b8bb4f38bd0ba4d1a7ceb96d354c055fa289f73363d8ff17694c2b4145a2d8064702c7594be6b6c96d9434665aca70e61b09fc1b4dffa6d28474870556115db
|
@@ -127,13 +127,15 @@ module Effective
|
|
127
127
|
else # Maybe from a string field
|
128
128
|
associated = relation.none
|
129
129
|
|
130
|
+
value_ids_integer_array = (value_ids.kind_of?(Array) && value_ids.length > 0 && value_ids.all? { |value| (value.to_i rescue nil).to_s == value })
|
131
|
+
|
130
132
|
relation.unscoped.distinct(foreign_type).pluck(foreign_type).each do |klass_name|
|
131
133
|
next if klass_name.nil?
|
132
134
|
|
133
135
|
resource = Effective::Resource.new(klass_name)
|
134
136
|
next unless resource.klass.present?
|
135
137
|
|
136
|
-
associated = associated.or(relation.where(foreign_id => value_ids, foreign_type => klass_name))
|
138
|
+
associated = associated.or(relation.where(foreign_id => (value_ids_integer_array ? value_ids : resource.search_any(value)), foreign_type => klass_name))
|
137
139
|
end
|
138
140
|
|
139
141
|
case operation
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.26.
|
4
|
+
version: 2.26.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|