refactors voting implementation [#25]

This commit is contained in:
rgarcia
2015-08-05 12:12:56 +02:00
parent cce6ca2fb9
commit 91b52ad8d2
9 changed files with 31 additions and 56 deletions

View File

@@ -1,11 +1,11 @@
<span class="in_favor">
<%= link_to "up", debate_comment_votes_path(@debate, comment, value: 'yes'),
<%= link_to "up", vote_comment_path(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'),
<%= link_to "down", vote_comment_path(comment, value: 'no'),
method: "post", remote: true %>
<%= comment.get_dislikes.size %>
</span>