effective_committees 0.9.3 → 0.9.5
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d78fcecb80be8b05b2a3e02921358f8183575caccd4e259b27ca856d98abc869
|
|
4
|
+
data.tar.gz: '07478672b7ba0c0474d8928041e1d16ac32199110244bc50998cfd9b1b8e918a'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ed635067e98101e0e8e33f7ef3ba0365cac457fc58d6fda4bc099c1043e4d20b690eea8bfb9068a0d9f8b1e6f99003c9c14ef206ba93f216adfee3c4bb7533c
|
|
7
|
+
data.tar.gz: b358afac722343b105466631e35ae62c49a34b1322d73c16ff58c551b35bc55326a75292f6268410f734091329424b14ee3f495a078722994e1a563783f53400
|
|
@@ -23,18 +23,6 @@ class EffectiveCommitteesDatatable < Effective::Datatable
|
|
|
23
23
|
pluralize(committee.committee_members.select(&:active?).length, committee_member_label.downcase)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
col :committee_folders, label: 'Folders'
|
|
27
|
-
|
|
28
|
-
col :committee_folders_count, as: :string, label: 'Folders', visible: false do |committee|
|
|
29
|
-
pluralize(committee.committee_folders_count, 'folders')
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
col :committee_files, label: 'Files', visible: false
|
|
33
|
-
|
|
34
|
-
col :committee_files_count, as: :string, label: 'Files' do |committee|
|
|
35
|
-
pluralize(committee.committee_files_count, 'files')
|
|
36
|
-
end
|
|
37
|
-
|
|
38
26
|
actions_col
|
|
39
27
|
end
|
|
40
28
|
|
|
@@ -29,6 +29,7 @@ module Effective
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
before_validation(if: -> { file.attached? }) do
|
|
32
|
+
self.title = file.attachment.blob.filename.to_s if title.blank?
|
|
32
33
|
assign_attributes(file_id: file.attachment.blob.id, file_created_at: file.attachment.blob.created_at)
|
|
33
34
|
end
|
|
34
35
|
|
|
@@ -36,8 +37,8 @@ module Effective
|
|
|
36
37
|
errors.add(:title, 'must end with a file extension') unless title.include?('.')
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
file.update(filename: title)
|
|
40
|
+
after_save(if: -> { title.present? && file.attached? }) do
|
|
41
|
+
file.blob.update!(filename: title) if file.blob.filename.to_s != title
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
scope :deep, -> { with_attached_file.includes(:committee, :committee_folder) }
|
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.9.
|
|
4
|
+
version: 0.9.5
|
|
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: 2026-03-
|
|
11
|
+
date: 2026-03-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|