mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Make email address voluntary in preferences; update tests to handle the added email field better
This commit is contained in:
parent
f9f7e6b9ea
commit
efee4976b0
5 changed files with 71 additions and 21 deletions
|
|
@ -107,7 +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 }
|
||||
validates :email, :allow_blank => true, 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