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.
When importing models with associations and the main model fails to validate, Activerecord-Import will import the associations anyway. This is with the
recursive: trueoption.The problem is here:
activerecord-import/lib/activerecord-import/import.rb
Line 749 in 5c0efb8
The models that failed to validate need to be filtered out from the
modelsvariable.