has_many_emails 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/has_many_emails.gemspec +1 -1
- data/lib/has_many_emails/instance_methods.rb +2 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.11
|
data/has_many_emails.gemspec
CHANGED
@@ -8,6 +8,7 @@ module HasManyEmails
|
|
8
8
|
# errors.add( :email, "Пользователь с таким емайлом уже зарегистрирован" ) if
|
9
9
|
# EmailAddress.find_by_email( email )
|
10
10
|
# end
|
11
|
+
|
11
12
|
def validate_email_addresses
|
12
13
|
email_addresses.each do |email_address|
|
13
14
|
if !email_address.valid? && email_address.errors.has_key?(:email)
|
@@ -57,7 +58,7 @@ module HasManyEmails
|
|
57
58
|
end
|
58
59
|
|
59
60
|
def add_email( value )
|
60
|
-
value = value.email if value.is_a? EmailAddress
|
61
|
+
value = value.email if value.is_a? ::EmailAddress
|
61
62
|
value.downcase!
|
62
63
|
return nil if value.blank? || has_email?( value )
|
63
64
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_many_emails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 11
|
10
|
+
version: 0.2.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Danil Pismenny
|