Remove votes query optimizations
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user