wired up vote ux

This commit is contained in:
Mark Moser committed 2016-11-20 11:35:08 -06:00
1 parent 74b2415b91
commit e8e745f356
2 files changed
+24 -28

No files matched your search

+1 -2
View File
@@ -50,8 +50,7 @@ class User < ApplicationRecord
def my_vote candidate
candidate = Candidate.find(candidate.to_i)
my_votes = votes.find_by(candidate_id: candidate.id)
my_votes.nil? ? "undecided" : my_votes.votes
votes.find_by(candidate_id: candidate.id).vote
end
# Roles