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.
This commit is contained in:
Javi Martín
2021-09-28 19:31:57 +02:00
parent 78f372fd0b
commit b98244afd9
29 changed files with 39 additions and 123 deletions

View File

@@ -68,14 +68,6 @@ class ApplicationController < ActionController::Base
end
end
def set_debate_votes(debates)
@debate_votes = current_user ? current_user.debate_votes(debates) : {}
end
def set_proposal_votes(proposals)
@proposal_votes = current_user ? current_user.proposal_votes(proposals) : {}
end
def set_comment_flags(comments)
@comment_flags = current_user ? current_user.comment_flags(comments) : {}
end