Codeminer42/cm42-central

View on GitHub
app/models/api_token.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ApiToken < ApplicationRecord
  before_create :generate_token

  belongs_to :team

  private

  def generate_token
    self.token = SecureRandom.hex
  end
end