Permalink
Browse files

use count since that actually works

  • Loading branch information...
1 parent 94031e9 commit 1e194746bcb99511ed98e10ab32ceca14532e8f4 @qrush qrush committed with Dec 14, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/watchtower/beam.rb
@@ -3,8 +3,8 @@ module Beam
def self.poll(beam)
results = []
beam.new.results.each do |result|
- existing = BEAMS.find('unique' => result['unique']).first
- if !existing
+ existing = BEAMS.find('unique' => result['unique'])
+ if existing.count == 0
self.save(result)
results << result
end
@@ -39,4 +39,4 @@ def self.count_today(options = {})
})).count()
end
end
-end
+end

0 comments on commit 1e19474

Please sign in to comment.