find_by(*) => where(*).first Search: find_by\((.*?)\)$ find_by\((.*?)\) Replace: where($1).first find_by!(*) => where(*).first! Search: find_by!\((.*?)\)$ find_by!\((.*?)\) Replace: where($1).first! find_by * => where(*).first Search: find_by\s(.*) Replace: where($1).first