projects
/
selectricity
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8e1a0d5
)
fix bug with token generator
author
<mako@atdot.cc>
<>
Sat, 27 Dec 2008 13:30:22 +0000
(08:30 -0500)
committer
<mako@atdot.cc>
<>
Sat, 27 Dec 2008 13:30:22 +0000
(08:30 -0500)
app/models/token.rb
patch
|
blob
|
history
diff --git
a/app/models/token.rb
b/app/models/token.rb
index c2d3667a9027a5a29da5628e04b9c73c0a6426d8..8bfecc40770854a111c3b3b10091e7f35cd85e9b 100644
(file)
--- a/
app/models/token.rb
+++ b/
app/models/token.rb
@@
-23,7
+23,8
@@
class Token < ActiveRecord::Base
super
token_generator = UniqueTokenGenerator.new( 16 )
- until not token.empty? and Token.find(:all, :conditions => [ "token = ?", token ]).empty? and token[0..3] != "open"
+ until token and not token.empty? \
+ and Token.find(:all, :conditions => [ "token = ?", token ]).empty? and token[0..3] != "open"
self.token = token_generator.token
end
Benjamin Mako Hill
||
Want to submit a patch?