add user scaffold
This commit is contained in:
10
app/models/user.rb
Normal file
10
app/models/user.rb
Normal 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
|
||||
Reference in New Issue
Block a user