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 CHANGED
@@ -1 +1 @@
1
- 0.2.10
1
+ 0.2.11
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{has_many_emails}
8
- s.version = "0.2.10"
8
+ s.version = "0.2.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Danil Pismenny"]
@@ -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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 10
10
- version: 0.2.10
9
+ - 11
10
+ version: 0.2.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Danil Pismenny