We have a schema requirement that InlineComments have non-nilgrade fields. When we split a team, we create a comment to acknowledge that, with a grade_id = 0, which corresponds to a nonexistent Grade...but it's technically not nil and so passes the database schema. We can make the belongs_to :grade be optional: true in InlineComment, which bypasses this check...but we might consider also making grade be nilable after all...
We have a schema requirement that
InlineComment
s have non-nil
grade
fields. When we split a team, we create a comment to acknowledge that, with agrade_id = 0
, which corresponds to a nonexistentGrade
...but it's technically notnil
and so passes the database schema. We can make thebelongs_to :grade
beoptional: true
inInlineComment
, which bypasses this check...but we might consider also makinggrade
be nilable after all...