belongs_to optional code example Example: belongs_to optional true belongs_to :lecture, optional: true