roomorama-validates_email 0.2.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cd43db3113b5ab8f9c035c40b2886e0da05cd0f
4
- data.tar.gz: 8fb2eeaacef748f54681bac5365bc2154f00778e
3
+ metadata.gz: ddcdbbde2feff111daaaa44a572a75862ed1dfbf
4
+ data.tar.gz: 89abaf46306e9a869477b2c112a2b4b4fd295da0
5
5
  SHA512:
6
- metadata.gz: 569ab3af9b4820d7648cb952f33d001ba24bac798bd90767ca22cf39fc554e5c54046cb50c6ab70867701f2d0e38672c2e11de29ae9d6bcf593c3a3df641682d
7
- data.tar.gz: a351233100109c9dc82c60271fc5172947877bd5c991dad45235006d7f8028679834bc3ae483f02cecf50e1339d7fb7c15395615bcf85117c8f585c001cfe413
6
+ metadata.gz: 41f7888a01fda2d35e2586398f0db5d983ebc80c90a9ab8b28eff6d16cb5cb3fbe8baba91a6f6459ab88afb264d3d690e3da4ce4be8afef17ac6106d60408095
7
+ data.tar.gz: 2978e739dc792899c5969c6ee3429d0ee2ed829cd4595b47a62afe782e5dbedb18d5e26b209ce0ab0eb114b8331c123cab892fd4a18aa8f2224facd4e75b773d
@@ -23,13 +23,13 @@ class EmailValidator < ActiveModel::EachValidator
23
23
  def validate_each(record, attribute, value)
24
24
  if validates_email_format(value)
25
25
  if options[:mailgun] && ENV['MAILGUN_PUBLIC_KEY'].present? && !validates_email_with_mailgun(value)
26
- record.errors[attribute] << (options[:mailgun_message] || I18n.t(:invalid, :scope => [:activerecord, :errors, :messages]))
26
+ record.errors.add(attribute, options[:mailgun_message] || :invalid)
27
27
  end
28
28
  if options[:mx] && !validates_email_domain(value, options[:mx])
29
- record.errors[attribute] << (options[:mx_message] || I18n.t(:mx_invalid, :scope => [:activerecord, :errors, :messages]))
29
+ record.errors.add(attribute, options[:mx_message] || :mx_invalid)
30
30
  end
31
31
  else
32
- record.errors[attribute] << (options[:message] || I18n.t(:invalid, :scope => [:activerecord, :errors, :messages]))
32
+ record.errors.add(attribute, options[:message] || :invalid)
33
33
  end
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module ValidatesEmail
2
- VERSION = '0.2.2'
2
+ VERSION = '0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roomorama-validates_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Piret
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-06 00:00:00.000000000 Z
11
+ date: 2014-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel