models: require belong_to associations on trusted_device_token
This commit is contained in:
parent
d807700c7b
commit
71d9774d58
3 changed files with 8 additions and 3 deletions
|
@ -12,7 +12,7 @@ class TrustedDeviceToken < ApplicationRecord
|
|||
LOGIN_TOKEN_VALIDITY = 1.week
|
||||
LOGIN_TOKEN_YOUTH = 15.minutes
|
||||
|
||||
belongs_to :instructeur
|
||||
belongs_to :instructeur, optional: false
|
||||
has_secure_token
|
||||
|
||||
def token_valid?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue