effective_memberships 0.9.1 → 0.9.3
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: f57ff3c095107ed08c1fb5d61bdb0a942199a18401a35f5a4eb58628ada269e3
|
4
|
+
data.tar.gz: c73dd52a349cc82ef354d022fe896d4b6ede70e8e0f049f4b37027e4042a9c71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 976725ff16f1b3cf32613f0a5ac941e28fdb26ba417dd70e1d4f11518ac76417de00a769839c65d849ea746f8bbddf5ff95e381ede4c5b03a978f4af0eb28033
|
7
|
+
data.tar.gz: de46c665dbe1985743eeddafd51e9b56b67bd06bd301140111c238953e903f0abf69ee50e52a4cd409be9d28a77e5adb923096930b481fd301be119fc1d41185
|
@@ -109,6 +109,17 @@ module EffectiveMembershipsFeePayment
|
|
109
109
|
validates :user, presence: true
|
110
110
|
validates :period, presence: true
|
111
111
|
|
112
|
+
# Sanity check validations. We should not have more than 1 in progress fee payment at a time
|
113
|
+
validate(if: -> { new_record? && user.present? }) do
|
114
|
+
existing = EffectiveMemberships.FeePayment.where(user: user).in_progress.first
|
115
|
+
self.errors.add(:base, 'please complete your existing fee payment first') if existing.present?
|
116
|
+
end
|
117
|
+
|
118
|
+
validate(if: -> { new_record? && organization.present? }) do
|
119
|
+
existing = EffectiveMemberships.FeePayment.where(organization: organization).in_progress.first
|
120
|
+
self.errors.add(:base, 'please complete your existing fee payment first') if existing.present?
|
121
|
+
end
|
122
|
+
|
112
123
|
# Declarations Step
|
113
124
|
with_options(if: -> { current_step == :declarations }) do
|
114
125
|
validates :declare_code_of_ethics, acceptance: true
|
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.3
|
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-11-
|
11
|
+
date: 2022-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|