diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb deleted file mode 100644 index 9dea0061d..000000000 --- a/app/helpers/tags_helper.rb +++ /dev/null @@ -1,32 +0,0 @@ -module TagsHelper - def taggables_path(taggable_type, tag_name) - case taggable_type - when "debate" - debates_path(search: tag_name) - when "proposal" - proposals_path(search: tag_name) - when "budget/investment" - budget_investments_path(@budget, search: tag_name) - when "legislation/proposal" - legislation_process_proposals_path(@process, search: tag_name) - else - "#" - end - end - - def taggable_path(taggable) - taggable_type = taggable.class.name.underscore - case taggable_type - when "debate" - debate_path(taggable) - when "proposal" - proposal_path(taggable) - when "budget/investment" - budget_investment_path(taggable.budget_id, taggable) - when "legislation/proposal" - legislation_process_proposal_path(@process, taggable) - else - "#" - end - end -end diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index f33abf8b7..55bc46d66 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -26,7 +26,7 @@ <% if @map_location&.available? %> <%= render "budgets/investments/map" %> <% end %> -<%= render "shared/tag_cloud", taggable: "budget/investment" %> +<%= render "shared/tag_cloud", taggable: "Budget::Investment" %> <%= render "budgets/investments/categories" %> <% if @heading && can?(:show, @ballot) %> diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index ce86822b2..26e8a0597 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -91,7 +91,7 @@ diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index fe79eea51..70462d085 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -129,7 +129,7 @@ <% if params[:retired].blank? %> <%= render "categories" %> - <%= render "shared/tag_cloud", taggable: "proposal" %> + <%= render "shared/tag_cloud", taggable: "Proposal" %> <%= render "geozones" %> <% end %> <%= render "retired" %> diff --git a/app/views/proposals/summary.html.erb b/app/views/proposals/summary.html.erb index 211d9891a..e7a86ed6d 100644 --- a/app/views/proposals/summary.html.erb +++ b/app/views/proposals/summary.html.erb @@ -44,7 +44,7 @@