Use find_or_create_by instead of first_or_create.