Make email mandatory + sign in translations
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 26s

This commit is contained in:
sto
2025-06-19 16:54:47 +02:00
parent 67492cdd15
commit ac83a599f3
4 changed files with 32 additions and 9 deletions

View File

@@ -23,5 +23,6 @@ class User < ApplicationRecord
normalizes :email_address, with: ->(e) { e.strip.downcase }
validates :username, presence: true, uniqueness: true
validates :email_address, presence: true, uniqueness: true
validates :lang, inclusion: { in: Languages::AVAILABLE_LANGUAGES.map { |lang| lang[:id] } }
end