Merge branch 'story/117690107-contact-email' into staging

This commit is contained in:
Vladimir Krylov 2016-04-15 13:50:54 +03:00
commit 2f200b5e2d

View file

@ -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
@ -415,6 +416,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