Help me understand the associations `on_replace: :delete` example in the docs

In your case a post can have only one comment, so there is only one comment that could be deleted.
So either you update the Post with the Comment with delete=true in the comment, and that comment (with the same id) will be delete,
or you specify on_replace: :delete and update the Post without any comments or with a new comment, and the on_replace will delete the existing comment.