You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hai there,
i have just started using activerecord-import i am following the way of creating a object and doing import and also setting run_callbacks along with validate_uniqueness: true when import fails i get an array of failed_instances but is there is way i can access the error?
what i mean is in models before_save callback i do some checks and add error to the object like errors.add("My error")
and throw(:abort) return false but this does not stop from Model.import to continue insert that record.
my question is, how to stop import to fail for a specific object in an array and how to show the errors that are added that model ?
The text was updated successfully, but these errors were encountered:
Hai there,
i have just started using activerecord-import i am following the way of creating a object and doing import and also setting
run_callbacks
along withvalidate_uniqueness: true
when import fails i get an array offailed_instances
but is there is way i can access the error?what i mean is in models before_save callback i do some checks and add error to the object like
errors.add("My error")
and
throw(:abort) return false
but this does not stop from Model.import to continue insert that record.my question is, how to stop import to fail for a specific object in an array and how to show the errors that are added that model ?
The text was updated successfully, but these errors were encountered: