effective_resources 2.26.0 → 2.26.2
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: 1a5f21cf765885ef02922b5b777b6b6da135f73c7e3aa8ef2b7707afeccdd473
|
4
|
+
data.tar.gz: 5e675ad42c234a38429331f6c25da8c81700e89bc0a13561918b9a0727dde7fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc2a99f88bbf80daf7fd0aa9113ebff4187577e99c636b5883927295cf6e55346be9a89fe9699e1589f1b9532d6f6ea24f708b6890d5991dd55d7759a930b167
|
7
|
+
data.tar.gz: c1446888c6427ac4d3f94db77807124826d269b0c3189cee9dd85c0deaa424cf7e0d84d145e776ca8a74c2f08bb804cce4ac2066e5a41f51d2ece5b1ec86bdf9
|
@@ -12,6 +12,11 @@ module Effective
|
|
12
12
|
collection = current_user.class.all
|
13
13
|
collection = collection.includes(:organizations) if with_organizations
|
14
14
|
|
15
|
+
# Display only related organization users
|
16
|
+
if with_organizations && params[:related]
|
17
|
+
collection = collection.where(id: current_user.organizations.flat_map(&:users))
|
18
|
+
end
|
19
|
+
|
15
20
|
respond_with_select2_ajax(collection, skip_authorize: true) do |user|
|
16
21
|
data = { first_name: user.first_name, last_name: user.last_name, email: user.email }
|
17
22
|
|
@@ -133,7 +133,7 @@ module Effective
|
|
133
133
|
resource = Effective::Resource.new(klass_name)
|
134
134
|
next unless resource.klass.present?
|
135
135
|
|
136
|
-
associated = associated.or(relation.where(foreign_id =>
|
136
|
+
associated = associated.or(relation.where(foreign_id => value_ids, foreign_type => klass_name))
|
137
137
|
end
|
138
138
|
|
139
139
|
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.2
|
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
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|