Skip to content

Commit 5392e64

Browse files
committed
Fix overriding generate_message option in validate_each
Fixes #65
1 parent 0467b3f commit 5392e64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/validates_email_format_of/active_model.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module ActiveModel
99
module Validations
1010
class EmailFormatValidator < EachValidator
1111
def validate_each(record, attribute, value)
12-
(ValidatesEmailFormatOf.validate_email_format(value, options.merge(generate_message: true)) || []).each do |error|
12+
(ValidatesEmailFormatOf.validate_email_format(value, options) || []).each do |error|
1313
record.errors.add(attribute, error)
1414
end
1515
end

0 commit comments

Comments
 (0)