How to find what all associations have dependent: destroy associated with them from a concern

I am building a soft delete solution a la
https://github.com/discourse/discourse/blob/master/app/models/concerns/trashable.rb
. Right now I am manually finding which all associated models need to be
deleted when a model is deleted and doing it manually in each model
which
of course is a not a good practice. How do I do it? I don’t want to use
a
gem, I want to write logic in my own hands.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs