X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/b47d1fbe36d5aeb9b79d6bbaab035ca448a3c3ef..81fbc45191a8c9bc5b23e3a997783af59321ff4f:/app/models/token.rb diff --git a/app/models/token.rb b/app/models/token.rb index aa432d6..c2d3667 100644 --- a/app/models/token.rb +++ b/app/models/token.rb @@ -23,7 +23,7 @@ class Token < ActiveRecord::Base super token_generator = UniqueTokenGenerator.new( 16 ) - until not token.empty? and Token.find(:all, :conditions => [ "token = ?", token ]).empty? + until not token.empty? and Token.find(:all, :conditions => [ "token = ?", token ]).empty? and token[0..3] != "open" self.token = token_generator.token end