add player rating to the db

This commit is contained in:
2026-10-25 17:10:40 +03:00
parent acdaebd491
commit 765a3365bd
9 changed files with 180 additions and 147 deletions
+1
View File
@@ -7,6 +7,7 @@ class User < ApplicationRecord
normalizes :nickname, with: ->(n) { n.strip }
validates :nickname, presence: true, uniqueness: { case_sensitive: false }, length: { minimum: 3, maximum: 24 }
validates :rating, presence: true
validates :password, presence: true, length: { minimum: 6 }, if: -> { new_record? || password_digest_changed? }
validate :avatar_content_type, if: -> { avatar.attached? }