effective_committees 0.3.0 → 0.3.1
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: dbb31cf79d4104f80164f1aa448576bdf3dbbf8d9546ee8168aad468bb3ac323
|
4
|
+
data.tar.gz: 91c44c4d88408777dbca98d9e5c9a27df9f57a7f4edd81be4cd62b53e7a7fd35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 784777f99c05787247df597ebd89faa5b536cf66ecb426d98e2e5d8750f370af1e419d54b23311b69f570fe6879023aa22dd7823fa5f1f8eb23fa588ea147075
|
7
|
+
data.tar.gz: dae5f13349c215669f55f1ee65479370235f9dc29a16a2df63b23a0e2028d85f5710d489baf74b0616f202bf8e6c80b8e8926f71b842da3e54091af2d171753f
|
@@ -20,6 +20,14 @@ module EffectiveCommitteesUser
|
|
20
20
|
class_name: 'Effective::CommitteeMember', inverse_of: :user, dependent: :delete_all
|
21
21
|
|
22
22
|
accepts_nested_attributes_for :committee_members, allow_destroy: true
|
23
|
+
|
24
|
+
scope :with_committee, -> (committees) {
|
25
|
+
committees = Resource.new(Effective::Committee).search_any(committees) if committees.kind_of?(String)
|
26
|
+
raise('expected an Effective::Committee') unless committees.present? && Array(committees).all? { |c| c.kind_of?(Effective::Committee) }
|
27
|
+
|
28
|
+
committee_members = Effective::CommitteeMember.where(committee: committees).where(user_type: name)
|
29
|
+
where(id: committee_members.select(:user_id))
|
30
|
+
}
|
23
31
|
end
|
24
32
|
|
25
33
|
# Instance Methods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_committees
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
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: 2023-
|
11
|
+
date: 2023-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|