Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Rails 6.0.1 old attachments get overwritten #41

Open
quantavi opened this issue Nov 29, 2019 · 1 comment
Open

In Rails 6.0.1 old attachments get overwritten #41

quantavi opened this issue Nov 29, 2019 · 1 comment

Comments

@quantavi
Copy link

After you add some attachments, the next time you do attaching, old attachments will be purged from the system.
This is due to a fact that the behaviour of Rails changed from version 5.2. It used to append attachments. You can control this in the Rails by setting the following config flag in config/environments/development.rb, production.rb and test.rb:
config.active_storage.replace_on_assign_to_many = false

Just adding this for consideration.

@joao-guerra
Copy link

Thank you, saved my life!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants