From c61d3c6b869227d59d8f4d238cce74e49e08a09c Mon Sep 17 00:00:00 2001 From: Pius Uzamere Date: Fri, 11 Dec 2009 10:45:16 -0500 Subject: [PATCH] making doubly sure we get an accurate vote and score count" --- app/controllers/choices_controller.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/app/controllers/choices_controller.rb b/app/controllers/choices_controller.rb index f4ef48e..a59b38a 100644 --- a/app/controllers/choices_controller.rb +++ b/app/controllers/choices_controller.rb @@ -25,7 +25,9 @@ class ChoicesController < InheritedResources::Base def show show! do |format| format.xml { + @choice.reload @choice.compute_score! + @choice.reload render :xml => @choice.to_xml(:methods => [:item_data, :wins_plus_losses])} format.json { render :json => @choice.to_json(:methods => [:data])} end -- libgit2 0.21.2