add vote counters to comments

This commit is contained in:
David Gil
2015-08-11 19:31:52 +02:00
parent 19ef481917
commit 0291f574a2
6 changed files with 28 additions and 8 deletions

View File

@@ -28,4 +28,7 @@ class Comment < ActiveRecord::Base
user
end
def total_votes
votes_for.size
end
end