effective_committees 0.3.7 → 0.3.9

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: 88193e5be302af15e49c0ebad2e644f3078c03b8902516fdb08e6f794c87397c
4
- data.tar.gz: e0330394def0ac2db747f96b5448a50c17e852bc81b1d0c3a65c5acb323ce8da
3
+ metadata.gz: a2490a1efd1eb1dc434adc9cf06d186ed168fd51b9d9a4539958f8116c99ecdf
4
+ data.tar.gz: df3bc9ed6726859a5960e7f363d9c3bee8fb09d5949aa14966bf6b5ef4e7c207
5
5
  SHA512:
6
- metadata.gz: 44355aaa14c5936f44a80f09364c930e947f0342c4cc1128d1ff7ac1297803e65b655273a8abee4456677e2c1fd2e31d591ee8063e899b61bfe03fe703e9fe9e
7
- data.tar.gz: de3059e0d5145f7b90ce188862822d848100be6f37a7c759cd8494d272ceab3210d765231e30d866444ba848e9286d6ae4feefa47d5a6212971bba4eb71640ce
6
+ metadata.gz: 9d6126999935f6670ed21e289e1fc71d99e86b266b7d907e3039e154ba8bb95be65ba7652b81dfcd791f923624fc5956bd86b2da696f7b0276aff7d7ea8df64e
7
+ data.tar.gz: 0bfda41f16500a8b5cd73e441d704ead5863ef8da3e42b641e50edfecbeeadd1237fc3b536ed5988c683ce5b78ec9d827a241c0f4d35ebfcd661d54bd25fab2b
@@ -7,6 +7,15 @@ module Admin
7
7
  col :committee, search: :string
8
8
  col :user, search: :string
9
9
 
10
+ if defined?(EffectiveMemberships)
11
+ col(:member_number, label: 'Member #', sort: false) do |committee_member|
12
+ committee_member.user.try(:membership).try(:number)
13
+ end.search do |collection, term|
14
+ memberships = Effective::Membership.where(owner_type: current_user.class.name).where('number ILIKE ?', "%#{term}%")
15
+ collection.where(user_id: memberships.select('owner_id'))
16
+ end
17
+ end
18
+
10
19
  unless attributes[:user_id]
11
20
  col :email do |committee_member|
12
21
  mail_to(committee_member.user.email)
@@ -9,7 +9,7 @@ module EffectiveCommittees
9
9
 
10
10
  # Include acts_as_addressable concern and allow any ActiveRecord object to call it
11
11
  initializer 'effective_committees.active_record' do |app|
12
- ActiveSupport.on_load :active_record do
12
+ app.config.to_prepare do
13
13
  ActiveRecord::Base.extend(EffectiveCommitteesUser::Base)
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveCommittees
2
- VERSION = '0.3.7'.freeze
2
+ VERSION = '0.3.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_committees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.9
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-12-01 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails