mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Add a field for user email address
This commit is contained in:
parent
0ff46f63dc
commit
dbaa9a85cb
7 changed files with 18 additions and 3 deletions
|
|
@ -107,6 +107,7 @@ class User < ApplicationRecord
|
|||
validates_length_of :login, within: 3..80
|
||||
validates_uniqueness_of :login, on: :create
|
||||
validate :validate_auth_type
|
||||
validates :email, format: { with: URI::MailTo::EMAIL_REGEXP }
|
||||
|
||||
before_create :crypt_password, :generate_token
|
||||
before_update :crypt_password
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue