add user scaffold

This commit is contained in:
João Victor Geonizeli
2022-02-27 14:46:30 -03:00
parent cec57e0ad2
commit 011a8cdb77
16 changed files with 163 additions and 19 deletions

10
app/models/user.rb Normal file
View File

@@ -0,0 +1,10 @@
class User < ApplicationRecord
validates :username,
presence: true,
uniqueness: true,
length: { maximum: 14 },
allow_nil: false,
format: {
with: /\A[a-zA-Z0-9]+\z/,
}
end