mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +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
|
@ -4,7 +4,7 @@ class AdminUser < User
|
|||
validates :identity_code, presence: true, if: -> { country_code == 'EE' }
|
||||
validates :email, presence: true
|
||||
validates :password, :password_confirmation, presence: true, if: :new_record?
|
||||
validates :password_confirmation, presence: true, if: :encrypted_password_changed?
|
||||
validates :password_confirmation, presence: true, if: :will_save_change_to_encrypted_password?
|
||||
validate :validate_identity_code, if: -> { country_code == 'EE' }
|
||||
|
||||
ROLES = %w(user customer_service admin) # should not match to api_users roles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue