blob: cc62778157b86f5a62e62dd3fb3f52f03c12f294 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class Token < CouchRest::Model::Base
use_database :tokens
property :user_id, String, accessible: false
validates :user_id, presence: true
def initialize(*args)
super
self.id = SecureRandom.urlsafe_base64(32).gsub(/^_*/, '')
end
design do
end
end
|