mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Change deprecated changed? methods to new in callbacks
This commit is contained in:
parent
95ad3086b0
commit
01114386b3
7 changed files with 14 additions and 9 deletions
|
@ -28,7 +28,7 @@ class Contact < ApplicationRecord
|
|||
validates :phone, presence: true, e164: true, phone: true
|
||||
|
||||
validates :email, format: /@/
|
||||
validates :email, email_format: { message: :invalid }, if: proc { |c| c.email_changed? }
|
||||
validates :email, email_format: { message: :invalid }, if: proc { |c| c.will_save_change_to_email? }
|
||||
|
||||
validates :code,
|
||||
uniqueness: { message: :epp_id_taken },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue