Move method to get available filters to the model

We're naming the method `investments_filters`, with the word
"investments" in plural, to be consistent with the method
`investments_orders`.
This commit is contained in:
Javi Martín
2021-09-16 01:07:03 +02:00
parent 36d795f69c
commit 1bfcfca2e2
3 changed files with 35 additions and 7 deletions

View File

@@ -16,12 +16,6 @@ module InvestmentFilters
end
def investment_filters
[
"not_unfeasible",
"unfeasible",
("unselected" if @budget.publishing_prices_or_later?),
("selected" if @budget.publishing_prices_or_later?),
("winners" if @budget.finished?)
].compact
@budget.investments_filters
end
end