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