Code Explainers
class Post < ApplicationRecord belongs_to :author, counter_cache: false has_many :comments, dependent: :destroy end