def create
user = User.create(user_params)
if user.save
flash[:notice] = '#{params[:user][:role]} created successfully'
redirect_to users_path(role: params[:role])
else
flash[:errors] = "#{user.errors.full_messages.join(', ')}"
redirect_to new_user_path
end
end
This is my create
method in user controller and am using invitation gem
file to send invitation.if I use same mail id to create another user then every data to existing user is updated. How can i prevent this from updating user.