Show only random order for unfeasible and unselected investments

This commit is contained in:
decabeza
2019-01-30 11:04:42 +01:00
parent 849dcb7a1a
commit 773302f0d7
3 changed files with 38 additions and 1 deletions

View File

@@ -60,6 +60,10 @@ module BudgetsHelper
Budget::Investment.by_budget(budget).tags_on(:valuation).order(:name).select(:name).distinct
end
def unfeasible_or_unselected_filter
["unselected", "unfeasible"].include?(@current_filter)
end
def budget_published?(budget)
!budget.drafting? || current_user&.administrator?
end