diff --git a/app/views/habits/index.html.erb b/app/views/habits/index.html.erb index a34a3ed51a..7b41f9fbba 100644 --- a/app/views/habits/index.html.erb +++ b/app/views/habits/index.html.erb @@ -1,12 +1,5 @@ <% content_for :score do %> -
<%= @score %>/100
- + <%= render :partial => "progressbar", :locals => { :score => @score } %> <% end %> diff --git a/app/views/habits/vote.js.erb b/app/views/habits/vote.js.erb index abb5e13816..ab34db2b3f 100644 --- a/app/views/habits/vote.js.erb +++ b/app/views/habits/vote.js.erb @@ -1,2 +1,2 @@ $('#habit_<%= @habit.id %>').replaceWith("<%= escape_javascript(render :partial => "habit", :locals => { :habit => @habit }) %>"); -$('#score').html("<%= @score %>"); +$('#progressbar').replaceWith("<%= escape_javascript(render :partial => "progressbar", :locals => { :score => @score }) %>");