Merge Vote.in with Vote.for_debates

This commit is contained in:
kikito
2015-09-01 13:08:32 +02:00
parent 9a071d2ed7
commit c2faf0ef92
3 changed files with 24 additions and 31 deletions

View File

@@ -77,8 +77,8 @@ class User < ActiveRecord::Base
end
def debate_votes(debates)
voted = votes.for_debates.in(debates)
voted.each_with_object({}) { |v, _| _[v.votable_id] = v.value }
voted = votes.for_debates(debates)
voted.each_with_object({}) { |v, h| h[v.votable_id] = v.value }
end
def administrator?