refactor(rails4) - replace find_by_attr with find_by method