From 9abb7dd66cf44051662bc3b8663e6492dd6d9953 Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 14 Jul 2013 15:55:01 +0200 Subject: prevent _ prefixes for couchDB document ids --- users/app/models/token.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users') 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 -- cgit v1.2.3