123456789101112131415161718192021222324252627282930313233343536373839 |
- class Token < ApplicationRecord
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TYPES = {
- password_reset: 'pw_reset',
- account_confirmation: 'confirm',
- api_authentication: 'api'
- }
- validates :token, uniqueness: true, presence: true
- validates :user, presence: true
- belongs_to :user
- end
|