1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Refactor: Use native error i18n lookup (#1076)

This commit is contained in:
Pedro Carmona 2024-08-13 01:38:58 +01:00 committed by GitHub
parent 150fce41a8
commit 14c4b9e93c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 103 additions and 26 deletions

View file

@ -178,7 +178,8 @@ class Import < ApplicationRecord
begin
CSV.parse(raw_csv_str || "")
rescue CSV::MalformedCSVError
errors.add(:raw_csv_str, "is not a valid CSV format")
# i18n-tasks-use t('activerecord.errors.models.import.attributes.raw_csv_str.invalid_csv_format')
errors.add(:raw_csv_str, :invalid_csv_format)
end
end
end