From e9792aa1abc9fdb66b9928df6115a5482a3f004a Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sat, 4 Feb 2012 12:58:34 -0500 Subject: [PATCH] Fix replacement of progressbar on vote --- app/views/habits/index.html.erb | 9 +-------- app/views/habits/vote.js.erb | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) 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 }) %>");