From e280645511fb55b37f73d4a7f3f7261ebe21231a Mon Sep 17 00:00:00 2001 From: kikito Date: Fri, 2 Dec 2016 19:22:11 +0100 Subject: [PATCH] transforms _votes to use parameters instead of @ variables --- app/views/budgets/investments/_votes.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb index d243535d1..7045ff63b 100644 --- a/app/views/budgets/investments/_votes.html.erb +++ b/app/views/budgets/investments/_votes.html.erb @@ -1,6 +1,6 @@ <% reason = investment.reason_for_not_being_selectable_by(current_user) %> <% voting_allowed = true unless reason.presence == :not_voting_allowed %> -<% user_voted_for = voted_for?(@budget_investment_votes, investment) %> +<% user_voted_for = voted_for?(investment_votes, investment) %>
@@ -13,7 +13,7 @@
<%= t("budget.investments.investment.already_supported") %>
- <% elsif @budget.selecting? %> + <% elsif investment.budget.selecting? %> <%= link_to vote_url, class: "button button-support small expanded", @@ -40,7 +40,7 @@ <% if user_voted_for && setting['twitter_handle'] %> <% end %>