scinote-web/app/models/token.rb
Zmago Devetak 502eb5c211 fixes tabs
2017-06-28 15:40:15 +02:00

10 lines
229 B
Ruby

class Token < ApplicationRecord
validates :token, presence: true
validates :ttl, presence: true
belongs_to :user,
foreign_key: 'user_id',
class_name: 'User',
inverse_of: :tokens,
optional: true
end