The difference between on_delete: :restrict, :nullify, and :cascade
13 December 2019
I was working on a Rails project today and came across this: I knew what a foreign key was, but I didn’t know the impact of the on_delete callback. Looking around the codebase, other options were used too: :nullify and :cascade. And several searches online didn’t help to explain what any of these actually did…. [Read More]