DEV Community

Discussion on: Exterminate! 🤖 (or Destroying Associated Records in Rails)

Collapse
 
satyapatidar profile image
Satya Patidar

Thanks Emily for the great post!

I am using dependent: :destroy approach in my Heroku Rails application and it seems to work well for small set of dependent records. But when the associated (has_many) is a bigger set and it's nested too (associated association can have has_many association and so on), it takes too long to destroy all those associations and on Heroku we have only 30 seconds request timeout, so eventually request times out.

Do you have any suggestion for this scenario?

Thanks in advance!