Skip to content

Commit

Permalink
Merge pull request #2376 from internetee/remove-validates-email-actio…
Browse files Browse the repository at this point in the history
…n-in-contact

Remove validates email action in contact
  • Loading branch information
vohmar authored May 17, 2022
2 parents a5e49c9 + a6fbdb8 commit 685e177
Show file tree
Hide file tree
Showing 7 changed files with 386 additions and 77 deletions.
2 changes: 1 addition & 1 deletion app/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Contact < ApplicationRecord

validates :phone, presence: true, e164: true, phone: true

validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
# validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }

validates :code,
uniqueness: { message: :epp_id_taken },
Expand Down
4 changes: 2 additions & 2 deletions app/models/registrar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class Registrar < ApplicationRecord
attribute :vat_rate, ::Type::VatRate.new
after_initialize :set_defaults

validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
validate :correct_billing_email_format
# validate :correct_email_format, if: proc { |c| c.will_save_change_to_email? }
# validate :correct_billing_email_format

alias_attribute :contact_email, :email

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class RemoveContactCodeCacheFromDomainContacts < ActiveRecord::Migration[6.1]
def change
# remove_column :domain_contacts, :contact_code_cache
remove_column :domain_contacts, :contact_code_cache
end
end
Loading

0 comments on commit 685e177

Please sign in to comment.