removes empty % sign when there are no votes

This commit is contained in:
rgarcia
2015-07-18 21:27:56 +02:00
parent 797160f108
commit afdb0980b0
3 changed files with 6 additions and 8 deletions

View File

@@ -10,12 +10,12 @@
<div>
<div id='in_favor'>
<%= link_to "up", debate_votes_path(@debate, value: 'yes'), method: "post" %>
<%= @debate.percentage('likes') %>%
<%= percentage('likes', @debate) %>
</div>
<div id='against'>
<%= link_to "down", debate_votes_path(@debate, value: 'no'), method: "post" %>
<%= @debate.percentage('dislikes') %>%
<%= percentage('dislikes', @debate) %>
</div>
Votos <%= @debate.total_votes %>