projects
/
selectricity-live
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merged from jdong
[selectricity-live]
/
app
/
models
/
token.rb
1
class Token < ActiveRecord::Base
2
belongs_to :vote
3
4
def initialize
5
super
6
7
token_generator = UniqueTokenGenerator.new( 16 )
8
until not token.empty? and Token.find(:all, :conditions => [ "token = ?", token ]).empty?
9
self.token = token_generator.token
10
end
11
12
self
13
end
14
15
def to_s
16
self.token
17
end
18
end
Benjamin Mako Hill
||
Want to submit a patch?