Class: Darjeelink::ApiToken

Inherits:
ApplicationRecord show all
Defined in:
app/models/darjeelink/api_token.rb

Instance Method Summary collapse

Instance Method Details

#generate_tokenObject



10
11
12
# File 'app/models/darjeelink/api_token.rb', line 10

def generate_token
  self.token = SecureRandom.uuid if token.blank?
end