<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,8 +14,7 @@ class Round &lt; ActiveRecord::Base
   has_many :flights
 
   validates_presence_of :name
-  validates_uniqueness_of :name, :case_sensitive =&gt; false,
-                                 :message =&gt; 'already exists'
+  validates_uniqueness_of :name, :case_sensitive =&gt; false, :message =&gt; 'already exists'
   validates_length_of :name, :maximum =&gt; 20, :allow_blank =&gt; true
   
   validates_presence_of :position
@@ -35,10 +34,10 @@ class Round &lt; ActiveRecord::Base
   end
 
   def self.completed?(round_number)
-    rounds = Round.find(:all, :conditions =&gt; [ 'position IN (?)', (1..round_number) ]) rescue nil
+    rounds = Round.all(:include =&gt; :flights, :conditions =&gt; [ 'position IN (?)', (1..round_number) ]) rescue nil
     raise ArgumentException if rounds.nil?
     rounds.all?{ |round|
-      round.flights.length &gt; 0 &amp;&amp; round.flights.all?{ |flight| flight.completed? }
+      round.flights.size &gt; 0 &amp;&amp; round.flights.all?{ |flight| flight.completed? }
     }
   end
 </diff>
      <filename>app/models/round.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>25df6854a3678ae03abf999c8e69c9a0a9ed4464</id>
    </parent>
  </parents>
  <author>
    <name>David Cato</name>
    <email>git@crunchyfrog.net</email>
  </author>
  <url>http://github.com/davec/openbrewcomp/commit/43f03441d0a4e7851e61350119f9d3e1bc54d187</url>
  <id>43f03441d0a4e7851e61350119f9d3e1bc54d187</id>
  <committed-date>2009-10-12T14:25:24-07:00</committed-date>
  <authored-date>2009-10-09T20:26:12-07:00</authored-date>
  <message>Tweak SQL</message>
  <tree>d97c1a9ab2547ec6bb337bcf72d8fb39c656dd2e</tree>
  <committer>
    <name>David Cato</name>
    <email>git@crunchyfrog.net</email>
  </committer>
</commit>
