Files
nairobi/app/components/proposals/votes_component.rb
Javi Martín b98244afd9 Remove votes query optimizations
Just like we did in commit 0214184b2d for investments, we're removing
some possible optimizations (we don't have any benchmarks proving they
affect performance at all) in order to simplify the code.

The investement votes component `delegate` code was accidentally left
but isn't used since commit 0214184b2, so we're removing it now that
we're removing the `voted_for?` helper method.
2022-02-21 18:47:13 +01:00

10 lines
271 B
Ruby

class Proposals::VotesComponent < ApplicationComponent
attr_reader :proposal, :vote_url
delegate :current_user, :link_to_verify_account, :user_signed_in?, to: :helpers
def initialize(proposal, vote_url:)
@proposal = proposal
@vote_url = vote_url
end
end