lib/validates_cpf.rb in validates_cpf-1.1.1 vs lib/validates_cpf.rb in validates_cpf-1.1.2
- old
+ new
@@ -5,8 +5,8 @@
require "validates_cpf/remarkable/require_a_valid_cpf_matcher" if defined?(::Remarkable)
class CpfValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
key = :"activerecord.errors.models.#{record.class.name.downcase}.attributes.#{attribute.to_s}.invalid"
- record.errors[attribute] << I18n.t(key, :default => :"errors.messages.invalid") unless CPF.new(value).valid?
+ record.errors[attribute] << I18n.t(key, :default => :"activerecord.errors.messages.invalid") unless CPF.new(value).valid?
end
end
\ No newline at end of file