X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/c5fda1e5174238779afd496014379d6446d1e3c1..905cf65f6b3e8acc894c268c3bf729e7b0c76292:/app/models/token.rb diff --git a/app/models/token.rb b/app/models/token.rb index 2bab513..4ed9598 100644 --- a/app/models/token.rb +++ b/app/models/token.rb @@ -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