displays only valuation tags for filtering

This commit is contained in:
rgarcia
2017-03-07 18:17:49 +01:00
parent a3b4b6b30d
commit 712d5f2d9a
3 changed files with 20 additions and 1 deletions

View File

@@ -38,4 +38,8 @@ module BudgetsHelper
def current_ballot
Budget::Ballot.where(user: current_user, budget: @budget).first
end
def investment_tags_select_options
Budget::Investment.tags_on(:valuation).order(:name).select(:name).distinct
end
end

View File

@@ -28,7 +28,7 @@
<div class="small-12 medium-3 column">
<%= select_tag :tag_name,
options_for_select(spending_proposal_tags_select_options, params[:tag_name]),
options_for_select(investment_tags_select_options, params[:tag_name]),
{ prompt: t("admin.budget_investments.index.tags_filter_all"),
label: false,
class: "js-submit-on-change" } %>