effective_polls 0.7.1 → 0.7.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: 8f18ce3f4be236e848fdaf1f0cbc5964f1c7d0f4d1f89efcb0d4fd565b1d1d21
4
- data.tar.gz: df60d1d96ad211ad97237165bcc366e1787dc03f3f938c1c4df7614184d34d6c
3
+ metadata.gz: 122647d1f26c0620535fdc508e81f440c6dd31f6aa6b237ec41b211e75df0b61
4
+ data.tar.gz: d0b810b3a7c6913b977add4f812c8af5a87760d25e5eab392ebbc602bc95f8a1
5
5
  SHA512:
6
- metadata.gz: fbbad665eaaecdb8d975e63d44daa8846acedb2b601c5669c61d506b9fbf002e2b83cd9a6c3a5e3a8f26bd419c43cfb4280694dd6d36d9d04a61646090b4221f
7
- data.tar.gz: 3bec1b83924572a0895ec8b3e499ad0d8ba590bbc58cf4bd429c22232fd9681d0f123d4bdd42e65776abfbd50c634b5185ed948ceffad948780c64741352319c
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
@@ -41,7 +41,7 @@
41
41
  %p Only the following individual users may complete this #{etd(poll)}
42
42
 
43
43
  -# Audience Users
44
- - ajax_url = (@select2_users_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test?
44
+ - ajax_url = (effective_resources.users_effective_ajax_index_path unless Rails.env.test?)
45
45
  = f.select :audience_scope, current_user.class.all, ajax_url: ajax_url, multiple: true
46
46
 
47
47
  = f.show_if :audience, 'Selected Users' do
@@ -1,3 +1,3 @@
1
1
  module EffectivePolls
2
- VERSION = '0.7.1'
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.1
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-06-25 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