Recently I came across a bug that took me a day to understand what was happening. Below is a sample reproduction of the relevant files I was working with:
app/models/user.rb
class User < ApplicationRecord
# columns id, email, name
has_many :comments, dependent: :destroy
end