Permalink
Browse files

fixed bonus rewrite_totals bug, display current frame score

  • Loading branch information...
1 parent 48cc33a commit 09ec0c6a039664906dec6f6576a7fef073447e07 @tritchie committed Oct 4, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/controllers/frames_controller.rb
  2. +1 −1 app/helpers/frames_helper.rb
@@ -68,7 +68,7 @@ def update
:active_frame => frameafter(@frame).id)
end
end
- rewrite_totals
+ rewrite_totals unless @frame.position == 11
format.html { redirect_to(@game, :notice => 'Frame was successfully updated.') }
format.xml { head :ok }
else
@@ -6,7 +6,7 @@ def box2(frame)
boxes(frame)[1]
end
def boxes(frame)
- return [nil, nil] if frame.position >= game_position
+ return [nil, nil] if frame.position > game_position
box1, box2 = frame.ball1, frame.ball2
if frame.ball1 == 10
box1 = nil; box2 = 'X'

0 comments on commit 09ec0c6

Please sign in to comment.