This could be `belongs_to :cookbook, through: :cookbook_version`. No need for an additional column to keep track of.