mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Merge pull request #138 from internetee/story/117690107-contact-email
Story#117690107 - strip contact email
This commit is contained in:
commit
720caf7799
1 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,7 @@ class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
before_validation :to_upcase_country_code
|
before_validation :to_upcase_country_code
|
||||||
before_validation :prefix_code
|
before_validation :prefix_code
|
||||||
|
before_validation :strip_email
|
||||||
before_create :generate_auth_info
|
before_create :generate_auth_info
|
||||||
|
|
||||||
before_update :manage_emails
|
before_update :manage_emails
|
||||||
|
@ -417,6 +418,10 @@ class Contact < ActiveRecord::Base
|
||||||
"#{code} #{name}"
|
"#{code} #{name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def strip_email
|
||||||
|
self.email = email.to_s.strip
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# what we can do load firstly by registrant
|
# what we can do load firstly by registrant
|
||||||
# if total is smaller than needed, the load more
|
# if total is smaller than needed, the load more
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue