adds voting for comments functionality [#25]

This commit is contained in:
rgarcia
2015-08-02 13:37:37 +02:00
parent 44ae7078ea
commit 2a3086010e
6 changed files with 40 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
<span class="in_favor">
<%= link_to "up", debate_comment_votes_path(@debate, comment, value: 'yes'),
method: "post", remote: true %>
<%= comment.get_likes.size %>
</span>
<span class="against">
<%= link_to "down", debate_comment_votes_path(@debate, comment, value: 'no'),
method: "post", remote: true %>
<%= comment.get_dislikes.size %>
</span>