sto 026bda2a99
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Add users controller
2025-03-14 16:37:21 +01:00

10 lines
261 B
Ruby

class User < ApplicationRecord
has_many :contests, dependent: :destroy
has_many :sessions, dependent: :destroy
has_secure_password
normalizes :email_address, with: ->(e) { e.strip.downcase }
validates :username, presence: true, uniqueness: true
end