Resolving transaction deadlocks on ActiveRecord associations | Hacker News Reader