removes forum and delegated votes from investments

This commit is contained in:
Juanjo Bazán
2016-05-23 16:36:33 +02:00
parent c48059594b
commit 282553543f

View File

@@ -133,15 +133,7 @@ class Budget
end end
def total_votes def total_votes
cached_votes_up + physical_votes + delegated_votes - forum_votes cached_votes_up + physical_votes
end
def delegated_votes
count = 0
representative_voters.each do |voter|
count += voter.forum.represented_users.select { |u| !u.voted_for?(self) }.count
end
return count
end end
def code def code