]> projects.mako.cc - selectricity-live/blobdiff - app/models/token.rb
* Add a few testcases for checking for nonexistent things
[selectricity-live] / app / models / token.rb
index 2bab51314f0df581cd22684811fe0360d8025918..4ed9598f15cddc4888a4c32612269ad3f0f124d2 100644 (file)
@@ -5,7 +5,7 @@ class Token < ActiveRecord::Base
     super
 
     token_generator = UniqueTokenGenerator.new( 16 )
-    until not token.empty? and Token.find_all( [ "token = ?", token ]).empty?
+    until not token.empty? and Token.find(:all, :conditions => [ "token = ?", token ]).empty?
       self.token = token_generator.token
     end
 

Benjamin Mako Hill || Want to submit a patch?