mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Refactor: Use native error i18n lookup (#1076)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user