summaryrefslogtreecommitdiff
path: root/users/app/models/token.rb
blob: 44a6dfe4b047ff8b12fd50d42d8af340ca216060 (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)
  end

  design do
  end
end