effective_memberships 0.4.17 → 0.4.18
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: 51b551fdd6f2f1148fcca4d2d34a8745c14e359210634508ae26939d4a4563ec
|
4
|
+
data.tar.gz: 85fff32681fd9c9e64e1010df663fb2ec7aeb5f95e2b9a95aeb7e944aad370c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e8c76e43c5e006162ffdc8c13274f3a6f70046a52bafac971487161f6720ba3ea056235c271d1e41778d2ec93cbc9feb4ca07e89486fd5f97a36e57f6308abc
|
7
|
+
data.tar.gz: 6cbadbdab149dd6f473fede0536c5f79710cd354cf229fc24f30ae3dbc0ae3706167eb45374e6839fd4e578da45944389c885fb279238dbd9d326872a9677d55
|
@@ -53,6 +53,15 @@ module EffectiveMembershipsOwner
|
|
53
53
|
where(id: with_paid_fees_through.select(:owner_id))
|
54
54
|
}
|
55
55
|
|
56
|
+
scope :members_with_category, -> (categories) {
|
57
|
+
raise('expected an EffectiveMemberships.Category') unless Array(categories).all? { |cat| cat.kind_of?(EffectiveMemberships.Category) }
|
58
|
+
|
59
|
+
membership_categories = Effective::MembershipCategory.where(category: categories)
|
60
|
+
memberships = Effective::Membership.where(id: membership_categories.select(:membership_id))
|
61
|
+
|
62
|
+
where(id: memberships.where(owner_type: name).select(:owner_id))
|
63
|
+
}
|
64
|
+
|
56
65
|
end
|
57
66
|
|
58
67
|
def assign_member_role
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_memberships
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.18
|
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: 2022-07-
|
11
|
+
date: 2022-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|