ActiveStorage Named Variants, Preprocessed Variants, and Representations for File Uploads in Rails Discussion
Hey all, we are using named variants with fixtures to both test and load example data in development. We started getting Foreign key violations found in your fixture data.
errors and found we needed to create an empty test/fixtures/active_storage/variant_records.yml
file to make sure the active_storage_variant_records
table is cleared out properly when reloading the fixture data with rails db:fixtures:load
.
Just sharing in case someone else comes across a similar issue.