effective_memberships 0.9.11 → 0.9.13

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: a661f6a2e71839e88147912a2822645b6b659cd8dad6d003e09e627dff721ffc
4
- data.tar.gz: 5da930fcdf416bc88a78ef11d8023160428d43aba6c2279da155b17983cea76e
3
+ metadata.gz: b9433add3d7d0b17df72da4ff6041b5667d2d57361b58d1f0a33e6c58e9a75ed
4
+ data.tar.gz: 68b962790a39557618f6b3f43bf79ad1d9416631b5bf7a48eba8296d68f9afc2
5
5
  SHA512:
6
- metadata.gz: e38cd2433c53e5b32531e7081f11389981f6ed801a7d6a7328ae5b1fe60b123c075fdf31504e00b61e0d158cc71868f69961fa833958de547010b1eaef9c4d03
7
- data.tar.gz: 105ebe2e7ce087697645e2d5553a583d1c2f3bd7d41cba9a99a5184a5c83036fbb2fa307750b770a9996d4bda3798c312e19636665aafbca4c31271c6c47b5d7
6
+ metadata.gz: 79784d64235015655ef74cb86025ea250b97984984b307508f7897d9800b48fae553fdcb7815d00a8332160ec2bd4d41667c89707ee1bd81871d181b3c5d8f29
7
+ data.tar.gz: 8d2063383c55489ab29f5a2f2532c2086f0827affae2d52cb5e29a973ea1e26f21125cdb61a5b7c344a4b9896cb65151520239e6a7287bcff5bc32d86edd2dfa
@@ -27,9 +27,11 @@ module Effective
27
27
  user.password ||= SecureRandom.base64(12) + '!@#123abcABC-'
28
28
  end
29
29
 
30
- after_commit(on: [:create, :destroy], if: -> { user.class.respond_to?(:effective_memberships_owner?) }) do
31
- user.representatives.reload
32
- user.update_member_role!
30
+ after_commit(on: [:create, :destroy], if: -> { user.class.respond_to?(:effective_memberships_owner?) && organization.class.respond_to?(:effective_memberships_owner?) }) do
31
+ if organization.membership_present?
32
+ user.representatives.reload
33
+ user.update_member_role!
34
+ end
33
35
  end
34
36
 
35
37
  validates :organization, presence: true
@@ -13,8 +13,8 @@
13
13
  = fs.hidden_field :applicant_id
14
14
  = fs.hidden_field :applicant_type
15
15
 
16
- = fs.hidden_field :user_id
17
- = fs.hidden_field :user_type
16
+ = fs.hidden_field :owner_id
17
+ = fs.hidden_field :owner_type
18
18
 
19
19
  = fs.hidden_field :price
20
20
  = fs.hidden_field :tax_exempt
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.9.11'
2
+ VERSION = '0.9.13'
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.11
4
+ version: 0.9.13
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: 2023-01-09 00:00:00.000000000 Z
11
+ date: 2023-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails