effective_memberships 0.9.8 → 0.9.10

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: 4bc5657a2097391cfb805df2692268a14cbd4ed48e11e131cf60557fdf0cffde
4
+ data.tar.gz: 377b12d152f9c31f6470583782b79279d3c5f77a2fe9e60e10d559a4cf5e0dab
5
5
  SHA512:
6
- metadata.gz: 835021e63b547f68e17ae9bd9ca6bbc523217e1f4f7c3eaf100696ef4456fb63b4f384765cad26db941aca67203ddb87e157ac64620e41220f98571a23d9074b
7
- data.tar.gz: 706ec5a09d03a23f5495ccae6ec1f28fb930a4a1533a41b15f6f9a859f6e1bbb1d19dd9df0f83e0e6a56fb0bd6abe6d378576e5d1d439a2fa9ebaa3adfec2d69
6
+ metadata.gz: 8271a9201d637efa7feecd01e5d1b882cab60c66417286479ff45a068831e1ef2477f5814de7e13def8613476793ab422b047c76733a60e3d50af559da79637f
7
+ data.tar.gz: c153829d44825f2122f9b2cfdb034012545cb55d7fff63186ca75330d9d6b493625770b17b4efcea8ec7b459baaffa814f77c7f23df07f5b4cb93b97fc4d6db8
@@ -190,7 +190,7 @@ module EffectiveMembershipsApplicant
190
190
 
191
191
  scope :not_draft, -> { where.not(status: :draft) }
192
192
 
193
- scope :reviewable, -> { where.not(status: [:draft, :declined, :approved]) }
193
+ scope :reviewable, -> { where.not(status: [:draft, :submitted, :declined, :approved]) }
194
194
 
195
195
  scope :for, -> (user) {
196
196
  raise('expected a effective memberships user') unless user.class.try(:effective_memberships_user?)
@@ -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
 
@@ -25,7 +25,7 @@
25
25
  - if membership.number.present?
26
26
  %p Your membership number is ##{membership.number} and you joined on #{membership.joined_on.strftime('%F')}.
27
27
  - else
28
- %p You joined on #{membership.joined_on.strftime('%F')} and have not been assigned a membership number.
28
+ %p You joined on #{membership.joined_on.strftime('%F')}.
29
29
 
30
30
  - if membership.registration_on > membership.joined_on
31
31
  %p Your last category or status change was on #{membership.registration_on.strftime('%F')}.
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.9.8'
2
+ VERSION = '0.9.10'
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.10
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