diff options
author | Azul <azul@leap.se> | 2013-07-14 15:55:01 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-07-16 12:30:13 +0200 |
commit | 9abb7dd66cf44051662bc3b8663e6492dd6d9953 (patch) | |
tree | 12f304a9a6fb5d4d2550f7ba3fb198ca2d4c8d47 /users/app/models/token.rb | |
parent | 48db4caa2fff451ce9cbb1b52c895ea7136736a4 (diff) |
prevent _ prefixes for couchDB document ids
Diffstat (limited to 'users/app/models/token.rb')
-rw-r--r-- | users/app/models/token.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/users/app/models/token.rb b/users/app/models/token.rb index 44a6dfe..cc62778 100644 --- a/users/app/models/token.rb +++ b/users/app/models/token.rb @@ -8,7 +8,7 @@ class Token < CouchRest::Model::Base def initialize(*args) super - self.id = SecureRandom.urlsafe_base64(32) + self.id = SecureRandom.urlsafe_base64(32).gsub(/^_*/, '') end design do |