Commit c61d3c6b869227d59d8f4d238cce74e49e08a09c
1 parent
1e863ca6
Exists in
master
and in
1 other branch
making doubly sure we get an accurate vote and score count"
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
app/controllers/choices_controller.rb
@@ -25,7 +25,9 @@ class ChoicesController < InheritedResources::Base | @@ -25,7 +25,9 @@ class ChoicesController < InheritedResources::Base | ||
25 | def show | 25 | def show |
26 | show! do |format| | 26 | show! do |format| |
27 | format.xml { | 27 | format.xml { |
28 | + @choice.reload | ||
28 | @choice.compute_score! | 29 | @choice.compute_score! |
30 | + @choice.reload | ||
29 | render :xml => @choice.to_xml(:methods => [:item_data, :wins_plus_losses])} | 31 | render :xml => @choice.to_xml(:methods => [:item_data, :wins_plus_losses])} |
30 | format.json { render :json => @choice.to_json(:methods => [:data])} | 32 | format.json { render :json => @choice.to_json(:methods => [:data])} |
31 | end | 33 | end |