Remove investment filters in groups

The interface was a bit confusing, since after clicking on "See
unfeasible investments" (or similar), we were on a page where no
investments were shown.

Besides, since commit 7e3dd47d5, the group page is only linked from the
"my ballot" page, through a link inviting the user to vote in that
group, and it's only possible to vote selected investments (which is the
default filter during the final voting phase).

The only reason we had these links here was these links weren't present
in the investments page. But they're present there since commit
04605d5d5, so we don't need them in the group page anymore.
This commit is contained in:
Javi Martín
2021-09-16 01:47:00 +02:00
parent 28a7aea1c0
commit 756a16f67a
10 changed files with 13 additions and 148 deletions

View File

@@ -1,21 +0,0 @@
module InvestmentFilters
extend ActiveSupport::Concern
class_methods do
def investment_filters
->(controller) { controller.investment_filters }
end
end
def set_default_investment_filter
if @budget&.finished?
params[:filter] ||= "winners"
elsif @budget&.publishing_prices_or_later?
params[:filter] ||= "selected"
end
end
def investment_filters
@budget.investments_filters
end
end