How to delete polymorphic models cascade
You will not be able to add the usual foreign keys for cascading delete records. But this can be implemented using a database.To do this, you need to write a trigger in the database that will run the delete function for each record.clas...
How to delete polymorphic models cascade #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/how-to-delete-polymorphic-models-cascade