effective_mentorships 0.3.2 → 0.3.4

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: 945b289d8db3d3677c664afe604a39f8def52d09a0aa7d29adebfcd655a6cb89
4
- data.tar.gz: 497b103498c79371700c455440edf05a37f04b37bcf9f076f3e222cc13abc10a
3
+ metadata.gz: 5f728ffae1604d9be50183e8f8175e2ac6d13abc13ee3393a66be989e323f628
4
+ data.tar.gz: c0979bcd8ef4e06b7e23dba107983bd751b1fa59b9d761a04b280421899a4762
5
5
  SHA512:
6
- metadata.gz: 7a33123dce1938db8df87d14bba03791d4c92ddf3ca9e1446dd70c041016d2c0aba1eafc84357af750e50a65931d15d07b46571204359304a3860a246f0ee588
7
- data.tar.gz: fde52709889007242daf8b59ef0789d2a019ba3c2a1a81493d81a663950b99268abca7f3c1e9a8a6b028292c57b4885fecfeda4f5c7e9ec16e72f496e06844e2
6
+ metadata.gz: 185ca5bc7c53553948a11e946651cf2394a8c1e3a62ba93e941fbec137d67ca94ffd4bea4e4a29ebdacf05421bf85fe625f4b29d733f3f0b99f8d2dc25bec816
7
+ data.tar.gz: d7cd8cf6371835ff698411c42101f60509af43a7a5646f266adddee8ab9fc8aa3da2f18f79acdb025072512cde4959fc3ea66cddc9731e9a2d2be6d9ac7e7f21
@@ -103,6 +103,10 @@ module EffectiveMentorshipsUser
103
103
  scope :mentorships_mentee_in_mentorship_cycle_id, -> (membership_cycle_id) {
104
104
  mentorships_mentees_with_groups(membership_cycle_id)
105
105
  }
106
+
107
+ scope :mentorships_opted_in_but_not_grouped_in_mentorship_cycle_id, -> (membership_cycle_id) {
108
+ mentorships_opted_in(membership_cycle_id).where(id: mentorships_without_groups(membership_cycle_id))
109
+ }
106
110
  end
107
111
 
108
112
  # Used for the dashboard datatables. Which cycles can we register for?
@@ -36,7 +36,7 @@ module Effective
36
36
 
37
37
  # Assign registration, if present
38
38
  before_validation(if: -> { user.present? && mentorship_cycle.present? }) do
39
- self.mentorship_registration ||= user.mentorship_registrations.find { |mentorship_registration| mentorship_registration.mentorship_cycle_id == mentorship_cycle.id }
39
+ self.mentorship_registration = user.mentorship_registrations.find { |mentorship_registration| mentorship_registration.mentorship_cycle_id == mentorship_cycle.id }
40
40
  end
41
41
 
42
42
  # Denormalized data for searching
@@ -1,3 +1,3 @@
1
1
  module EffectiveMentorships
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_mentorships
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
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: 2025-01-13 00:00:00.000000000 Z
11
+ date: 2025-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails