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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc5657a2097391cfb805df2692268a14cbd4ed48e11e131cf60557fdf0cffde
|
4
|
+
data.tar.gz: 377b12d152f9c31f6470583782b79279d3c5f77a2fe9e60e10d559a4cf5e0dab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 |
|
630
|
-
|
631
|
-
|
632
|
-
(
|
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')}
|
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')}.
|
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.
|
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:
|
11
|
+
date: 2023-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|