diff --git a/app/views/habits/_habit.html.erb b/app/views/habits/_habit.html.erb index fd82f60dc7..a9a76a0c15 100644 --- a/app/views/habits/_habit.html.erb +++ b/app/views/habits/_habit.html.erb @@ -15,8 +15,8 @@ <% if habit.habit_type==Habit::ALWAYS %> - <%= link_to "√", { :action => "vote", :id => habit.id, :vote => 'up' }, :remote=>true %> - <%= link_to "X", { :action => "vote", :id => habit.id, :vote => 'down' }, :remote=>true %> + <%= link_to("√", { :action => "vote", :id => habit.id, :vote => 'up' }, :remote=>true) if habit.up %> + <%= link_to("X", { :action => "vote", :id => habit.id, :vote => 'down' }, :remote=>true) if habit.down %> <%= raw name %> (<%= habit.score %>) <% elsif habit.habit_type==Habit::DAILY %> <% if habit.done %>