All threads / Active storage has_many_attach replaces older images instead of appending them in Rails 6

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Active storage has_many_attach replaces older images instead of appending them in Rails 6

Tabish Iqbal asked in Rails

Was having issues with this but found out behavior was changed from Rails 5. You have to now add the following in your application.rb file:

  config.active_storage.replace_on_assign_to_many = false

Notes on this can be found in the change logs here: https://edgeguides.rubyonrails.org/6_0_release_notes.html#active-storage-notable-changes

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 38,558+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.