zdennis/activerecord-import

Activerecord-Import imports associations for invalid models

jacob-carlborg-apoex opened this issue · 0 comments

When importing models with associations and the main model fails to validate, Activerecord-Import will import the associations anyway. This is with the recursive: true option.

The problem is here:

import_associations(models, options.dup.merge(validate: false))

The models that failed to validate need to be filtered out from the models variable. I don't have time right now to do a PR.