effective_memberships 0.9.8 → 0.9.9

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: 612909b87d53748d9b3488893e419cf6f8bdcb852fdb07d3bd0f015bda89771c
4
- data.tar.gz: 7c48d16e502036542d4f80e785986134e19466593b44ecce9cef151e76387acc
3
+ metadata.gz: 60f83e2a6f429e7a417d5a9b3a9026a1a391ec6fe301230514d66a1a2493574d
4
+ data.tar.gz: aedbc568e9fa8c3679c3bbc99567dd49cf379d735da7372d8460985e4eee401f
5
5
  SHA512:
6
- metadata.gz: 835021e63b547f68e17ae9bd9ca6bbc523217e1f4f7c3eaf100696ef4456fb63b4f384765cad26db941aca67203ddb87e157ac64620e41220f98571a23d9074b
7
- data.tar.gz: 706ec5a09d03a23f5495ccae6ec1f28fb930a4a1533a41b15f6f9a859f6e1bbb1d19dd9df0f83e0e6a56fb0bd6abe6d378576e5d1d439a2fa9ebaa3adfec2d69
6
+ metadata.gz: 1adb7214ff9a1b55255c55f076cf7684b3484926db1d2158365f5b367976b7867e65de05f722b8649d53736f214164b08241291c9e8f4170d07867ab33c0429c
7
+ data.tar.gz: 86c67adb9985b2bbbd626f271b3d537f61feb5c8b32daea1dba14669c538681be80d475e2ad06c579c513a1da4dee3b259303b0741cda1ad403c86377a9519e9
@@ -624,12 +624,12 @@ module EffectiveMembershipsApplicant
624
624
  return categories.where(can_apply_new: true)
625
625
  end
626
626
 
627
- category_ids = user.membership.category_ids
627
+ category_ids = user.membership.category_ids.map(&:to_s) - [nil, '']
628
628
 
629
- categories.select do |cat|
630
- cat.can_apply_new? ||
631
- cat.can_apply_existing? ||
632
- (cat.can_apply_restricted? && (category_ids & cat.can_apply_restricted_ids).present?)
629
+ categories.select do |category|
630
+ category.can_apply_new? ||
631
+ category.can_apply_existing? ||
632
+ (category.can_apply_restricted? && (category_ids & category.can_apply_restricted_ids).present?)
633
633
  end
634
634
  end
635
635
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.9.8'
2
+ VERSION = '0.9.9'
3
3
  end
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.9.8
4
+ version: 0.9.9
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-12-13 00:00:00.000000000 Z
11
+ date: 2023-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails