effective_polls 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6a8bdf3c390cdfb86549465e0b02dca81c9036e6dc62535c0b520be3bf56c91
4
- data.tar.gz: 19eef49b77145f3efca025591e2a790efcf0c88a1e98d0599edd4a874caebaf0
3
+ metadata.gz: 122647d1f26c0620535fdc508e81f440c6dd31f6aa6b237ec41b211e75df0b61
4
+ data.tar.gz: d0b810b3a7c6913b977add4f812c8af5a87760d25e5eab392ebbc602bc95f8a1
5
5
  SHA512:
6
- metadata.gz: 7a20600e039346a802e89b17bf24457793d2efdc8d2848dfaec78a59be8be5366261027f4dc6c3c78fc178652acaf06644f7521c1398e07750e4d17bbe2ac66b
7
- data.tar.gz: 17d0bc1e39ca2ff8221f1eecc02ee5c897d2fd930d539cbc728a4112d699f8c959877edf118a0920b5472fcff8744bc23cb62ce0a232bcc2df2a2f4e1f1ab608
6
+ metadata.gz: 87014eb281b852c249a55f8a2cb933e72c50de0761db41dfbe61ce7935270fac4a4864bdd41dc56503d37b26d2d3a3a70a40d1aa459e965fab01ee46d9cdbd88
7
+ data.tar.gz: 65845b7be6d52dc746406674f2e1a7c5cda78ec8c9b7f1e096891004f4e494b958bdcb3c043eb4c7a07fa798560f6429b0b08c8268426f01b4cc7951eb491878
@@ -55,6 +55,16 @@ module EffectivePollsUser
55
55
  end
56
56
  end
57
57
 
58
+ if self.class.try(:effective_mentorships_user?)
59
+ Effective::MentorshipCycle.sorted.each do |cycle|
60
+ scopes += [
61
+ ["All grouped participants in #{cycle}", "mentorships_with_groups_id_#{cycle.id}"],
62
+ ["All grouped mentors in #{cycle}", "mentorships_mentors_with_groups_id_#{cycle.id}"],
63
+ ["All grouped mentees in #{cycle}", "mentorships_mentees_with_groups_id_#{cycle.id}"],
64
+ ]
65
+ end
66
+ end
67
+
58
68
  scopes
59
69
  end
60
70
 
@@ -72,6 +82,12 @@ module EffectivePollsUser
72
82
  return collection.with_committee(Effective::Committee.find_by_id(id))
73
83
  when :with_role
74
84
  return collection.with_role(id)
85
+ when :mentorships_with_groups
86
+ return collection.mentorships_with_groups(Effective::MentorshipCycle.find_by_id(id))
87
+ when :mentorships_mentors_with_groups
88
+ return collection.mentorships_mentors_with_groups(Effective::MentorshipCycle.find_by_id(id))
89
+ when :mentorships_mentees_with_groups
90
+ return collection.mentorships_mentees_with_groups(Effective::MentorshipCycle.find_by_id(id))
75
91
  end
76
92
 
77
93
  # Otherwise we don't know what this scope is
@@ -1,3 +1,3 @@
1
1
  module EffectivePolls
2
- VERSION = '0.7.2'
2
+ VERSION = '0.7.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_polls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.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: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails