I have a user model and no soft deletion is enabled for the user model. For one it's associated model(has_many association) say posts, soft deletion is enabled. What I want is to hard delete all the associated posts when a user is deleted.
In User.rb
has_many :posts, dependent: :destroy
Which just soft deletes the associated records. So the exception will be raised when deleting the user. Is there any option to hard delete the associated records in the model level?. Or have to do something in before_destroy callback to achieve this?
Note: Have used paranoia gem for soft deletion