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