diff --git a/app/components/budgets/investments/votes_component.rb b/app/components/budgets/investments/votes_component.rb index 0d7bd97b9..65e6251b4 100644 --- a/app/components/budgets/investments/votes_component.rb +++ b/app/components/budgets/investments/votes_component.rb @@ -1,6 +1,6 @@ class Budgets::Investments::VotesComponent < ApplicationComponent attr_reader :investment - delegate :namespace, :current_user, :voted_for?, :image_absolute_url, + delegate :namespace, :current_user, :image_absolute_url, :link_to_verify_account, :link_to_signin, :link_to_signup, to: :helpers def initialize(investment) diff --git a/app/components/debates/votes_component.html.erb b/app/components/debates/votes_component.html.erb index bf525b7c0..8c0570e67 100644 --- a/app/components/debates/votes_component.html.erb +++ b/app/components/debates/votes_component.html.erb @@ -1,4 +1,4 @@ -<% voted_classes = css_classes_for_vote(debate_votes, debate) %> +<% voted_classes = css_classes_for_vote(debate) %>
<% if user_signed_in? %> diff --git a/app/components/debates/votes_component.rb b/app/components/debates/votes_component.rb index 19f893396..2c75f7f43 100644 --- a/app/components/debates/votes_component.rb +++ b/app/components/debates/votes_component.rb @@ -1,9 +1,8 @@ class Debates::VotesComponent < ApplicationComponent - attr_reader :debate, :debate_votes + attr_reader :debate delegate :css_classes_for_vote, :current_user, :link_to_verify_account, :user_signed_in?, :votes_percentage, to: :helpers - def initialize(debate, debate_votes:) + def initialize(debate) @debate = debate - @debate_votes = debate_votes end end diff --git a/app/components/legislation/proposals/votes_component.html.erb b/app/components/legislation/proposals/votes_component.html.erb index be9cc0495..34961266d 100644 --- a/app/components/legislation/proposals/votes_component.html.erb +++ b/app/components/legislation/proposals/votes_component.html.erb @@ -1,4 +1,4 @@ -<% voted_classes = css_classes_for_vote(legislation_proposal_votes, proposal) %> +<% voted_classes = css_classes_for_vote(proposal) %>
<% if proposal.process.proposals_phase.open? %>
@@ -64,7 +64,7 @@
<% end %> - <% if voted_for?(legislation_proposal_votes, proposal) && setting["twitter_handle"] %> + <% if current_user&.voted_as_when_voted_for(proposal) && setting["twitter_handle"] %>