updates query to be more efficient

This commit is contained in:
rgarcia
2016-09-20 11:44:43 +02:00
parent e0951a2f2d
commit a6384af527

View File

@@ -19,7 +19,7 @@ class Poll
end
def has_voted?
poll.voters.where(document_number: document_number, document_type: document_type).present?
poll.voters.where(document_number: document_number, document_type: document_type).exists?
end
def name