voting requires a comment - completes #102

This commit is contained in:
Mark Moser
2017-02-27 13:41:46 -06:00
parent 538190b6bf
commit 3f41773c76
11 changed files with 84 additions and 18 deletions

View File

@ -19,6 +19,10 @@ class User < ApplicationRecord
save
end
def commented_on? test_hash
quiz_comments.where(test_hash: test_hash).count.positive?
end
# Voting
# TODO: Refactor this out of User, belongs on ReviewerVote
# ie: cast_yea(candidate, user)