brcpfcnpj 3.0.6 → 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  class CnpjValidator < ActiveModel::EachValidator
2
2
  def validate_each(record, attribute, value)
3
3
  return if value.nil?
4
- record.errors[attribute] << "nao e um CNPJ valido" unless Cnpj.new(value).valido?
4
+ record.errors.add attribute, :invalid unless Cnpj.new(value).valido?
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  class CpfValidator < ActiveModel::EachValidator
2
2
  def validate_each(record, attribute, value)
3
3
  return if value.nil?
4
- record.errors[attribute] << "nao e um CPF valido" unless Cpf.new(value).valido?
4
+ record.errors.add attribute, :invalid unless Cpf.new(value).valido?
5
5
  end
6
6
  end
@@ -2,7 +2,7 @@ module BrCpfCnpj
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 6
5
+ TINY = 7
6
6
 
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 6
9
- version: 3.0.6
8
+ - 7
9
+ version: 3.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Marcos Tapaj\xC3\xB3s"
@@ -20,7 +20,7 @@ autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
22
 
23
- date: 2012-01-02 00:00:00 -02:00
23
+ date: 2012-01-03 00:00:00 -02:00
24
24
  default_executable:
25
25
  dependencies:
26
26
  - !ruby/object:Gem::Dependency
@@ -123,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
- hash: 3643706487061768745
126
+ hash: -1969045908206341566
127
127
  segments:
128
128
  - 0
129
129
  version: "0"
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
- hash: 3643706487061768745
135
+ hash: -1969045908206341566
136
136
  segments:
137
137
  - 0
138
138
  version: "0"