Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use count since that actually works

  • Loading branch information...
commit bc9a173538ecfc10ce9d02cb5339dcd541ff5eb7 1 parent 94031e9
@qrush authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/watchtower/beam.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.