effective_resources 2.26.0 → 2.26.2

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: 76931ae3422d0b14af4c84ed8670f0a03eba10ffb55804850d8d6aa23409d947
4
- data.tar.gz: 9a8f17357dd11e73cc82070c20825fa63e89701ec80f1de679479c6b1f1123a9
3
+ metadata.gz: 1a5f21cf765885ef02922b5b777b6b6da135f73c7e3aa8ef2b7707afeccdd473
4
+ data.tar.gz: 5e675ad42c234a38429331f6c25da8c81700e89bc0a13561918b9a0727dde7fc
5
5
  SHA512:
6
- metadata.gz: 20bc96638e82faf39e0595eee398104967dbc273e308c15768f32d55e518430698017c63a233b84a192a0be6a7ade9bb3a80c344274271a230e839d55c8b5672
7
- data.tar.gz: 7eacea35ae629bcd2b6febb4d548bf15c239d3c5422b01633dd967f780b2590c94ca8bf92ca27832a430f45d74e51e90a2150c16715e0b2e7bc4b8c00eb91d78
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 => resource.search_any(value), foreign_type => klass_name))
136
+ associated = associated.or(relation.where(foreign_id => value_ids, foreign_type => klass_name))
137
137
  end
138
138
 
139
139
  case operation
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.26.0'.freeze
2
+ VERSION = '2.26.2'.freeze
3
3
  end
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.0
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-10-04 00:00:00.000000000 Z
11
+ date: 2024-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails