FEATURE: Secondary emails support.

This commit is contained in:
Leo McArdle
2018-07-03 12:51:22 +01:00
committed by Guo Xiang Tan
parent 50e59fb9bd
commit 21ebb1cd54
16 changed files with 307 additions and 14 deletions

View File

@ -15,6 +15,8 @@ class UserEmail < ActiveRecord::Base
validate :user_id_not_changed, if: :primary
validate :unique_email
scope :secondary, -> { where(primary: false) }
private
def strip_downcase_email