Just like we did in commit0214184b2dfor 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 commit0214184b2, so we're removing it now that we're removing the `voted_for?` helper method.
10 lines
271 B
Ruby
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
|