mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 04:24:06 +00:00
Preference to set default_period (#1941)
This commit is contained in:
@@ -9,6 +9,7 @@ class User < ApplicationRecord
|
||||
|
||||
validates :email, presence: true, uniqueness: true, format: { with: URI::MailTo::EMAIL_REGEXP }
|
||||
validate :ensure_valid_profile_image
|
||||
validates :default_period, inclusion: { in: Period::PERIODS.keys }
|
||||
normalizes :email, with: ->(email) { email.strip.downcase }
|
||||
normalizes :unconfirmed_email, with: ->(email) { email&.strip&.downcase }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user