This corrects a small association issue and hushes noisy log output for tests.
Previously chunks were being saved on a non-persisted file model in #put (this shouldn't have been working). With mongoid 6, stricter validation prevents chunks from being saved without a persisted file. Now the file model is persisted before chunks are saved. This removes the old chunks array since we can simply destroy the file model and its dependents upon rescue.
This corrects a small association issue and hushes noisy log output for tests.
Previously chunks were being saved on a non-persisted file model in
#put
(this shouldn't have been working). With mongoid 6, stricter validation prevents chunks from being saved without a persisted file. Now the file model is persisted before chunks are saved. This removes the old chunks array since we can simply destroy the file model and its dependents upon rescue.Ref #60