Revert "Refactor where(...).first to find_by(...)."

This reverts commit 6c8e4c8071397806f1268e4210186f826e1fb5b8.
Second attempt at the where(...).first to find_by(...) refactoring.