mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Change deprecated usage of strings in if blocks
This commit is contained in:
parent
af57711dc0
commit
95ad3086b0
4 changed files with 6 additions and 6 deletions
|
@ -23,7 +23,7 @@ class Contact < ApplicationRecord
|
|||
accepts_nested_attributes_for :legal_documents
|
||||
|
||||
validates :name, :email, presence: true
|
||||
validates :street, :city, :zip, :country_code, presence: true, if: 'self.class.address_processing?'
|
||||
validates :street, :city, :zip, :country_code, presence: true, if: -> { self.class.address_processing? }
|
||||
|
||||
validates :phone, presence: true, e164: true, phone: true
|
||||
|
||||
|
@ -37,7 +37,7 @@ class Contact < ApplicationRecord
|
|||
validates_associated :identifier
|
||||
|
||||
validate :validate_html
|
||||
validate :validate_country_code, if: 'self.class.address_processing?'
|
||||
validate :validate_country_code, if: -> { self.class.address_processing? }
|
||||
|
||||
after_initialize do
|
||||
self.status_notes = {} if status_notes.nil?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue