This is just a post that may help me stop being stupid. Writing it may help carve it into the permanent portion of my memory instead of the “forget about it and then periodically have to think twice and remember that you did something stupid” portion.
It’s a small thing, more of an annoyance than a real problem. Something like my tendency to forget “end” after blocks (a Python holdover) and to assume that zero equals false (a sort of “everything else” holdover).
It boils down to this:
belongs_to is singular, you stupid dipshit! Stop being a mindless screwhead and remember that for a change, John!
Honestly, it only takes me a second once I get the ever familiar error, but it’s just better to not get the error at all, right? Efficiency and correctness.
If anyone reads this and runs into me later, I wouldn’t mind if you repeat that statement to me.
More reminders couldn’t hurt.
how can belongs_to be singular when the word belongs ends in an 's'? stupid English language.
Because subject and verb agreement in English says that when the noun is singular, the verb is plural (and vice versa).
The cat climbs the tree.
The cats climb the tree.