Fixing PG::UniqueViolation when there isn't a unique violation
It's easy to assume that PostgreSQL is working and the problem is in your code. But this time, it isn't.
This article has been republished and moved to https://codewithrails.com/fixing-pg-unique-violation.