Skip to content

Commit

Permalink
Use I18n interpolator to get rid of 'too many arguments for format st…
Browse files Browse the repository at this point in the history
…ring' warning
  • Loading branch information
Hampei authored and hallelujah committed Mar 9, 2023
1 parent dbb9fee commit ae7d3ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/valid_email/email_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def validate_each(record,attribute,value)
end
unless r
msg = (options[:message] || I18n.t(:invalid, :scope => "valid_email.validations.email"))
record.errors.add attribute, message: (msg % {value: value})
record.errors.add attribute, message: I18n.interpolate(msgs, value: value)
end
end
end

0 comments on commit ae7d3ea

Please sign in to comment.