-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
app/overrides/cells/decidim/participatory_processes/process_filters_cell_override.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# We would love to do a prepend instead of what is happening here | ||
# For whatever reason though the prepend never properly works | ||
# Even if we include the module it doesn't get loaded | ||
# Must be some crazy loading shenanigans | ||
# Pry-ing into the customization class and using the following commands might be useful for future debugging: | ||
# $ -a Decidim::ParticipatoryProcesses::ProcessFiltersCell | ||
# $ -a DecidimZuerich::ParticipatoryProcesses::ProcessFiltersCell | ||
Decidim::ParticipatoryProcesses::ProcessFiltersCell.class_eval do | ||
def other_filters_with_value | ||
@other_filters_with_value ||= [current_filter] + other_filters.select do |filter| | ||
process_count_by_filter[filter].positive? | ||
end | ||
end | ||
end |