X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/fc0a6a8d7ea15bcdb27ebdd58721401c7045c6e0..1fd6324d0cfef4441f96fc4c19c03fddbedfe1de:/app/models/token.rb?ds=sidebyside diff --git a/app/models/token.rb b/app/models/token.rb old mode 100755 new mode 100644 index 2bab513..4ed9598 --- 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