From 938ba4030633bee8be5efb789ec09e19e43b4e60 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Sun, 15 Jan 2017 12:00:14 +0100 Subject: [PATCH] loads categories in sidebar for balloting phase --- app/controllers/budgets/ballot/lines_controller.rb | 4 ++++ app/views/budgets/investments/_sidebar.html.erb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/budgets/ballot/lines_controller.rb b/app/controllers/budgets/ballot/lines_controller.rb index 0f8209e5a..bd31c61fa 100644 --- a/app/controllers/budgets/ballot/lines_controller.rb +++ b/app/controllers/budgets/ballot/lines_controller.rb @@ -5,6 +5,7 @@ module Budgets #before_action :ensure_final_voting_allowed before_action :load_budget before_action :load_ballot + before_action :load_categories before_action :load_investments @@ -63,6 +64,9 @@ module Budgets @heading = @investment.heading end + def load_categories + @categories = ActsAsTaggableOn::Tag.where("kind = 'category'").order(:name) + end end end end diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index 2a241300f..4075bb29e 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -14,8 +14,8 @@ <% end %> <%= render "shared/tag_cloud", taggable: 'budget/investment' %> -<%= render 'categories' %> -<%= render 'feasibility_link' %> +<%= render 'budgets/investments/categories' %> +<%= render 'budgets/investments/feasibility_link' %> <% if @heading && can?(:show, @ballot) %>