从文档中我认为它不应该发送确认电子邮件,但它正在这样做。
这是我对邀请动作的设置:
class Users::InvitationsController < Devise::InvitationsController
def multiple_create
if params[:multiple_emails].blank?
build_resource
render :new, notice: "something went wrong"
else
params[:multiple_emails].each do |email|
User.invite!({email: email}, current_user) # current_user will be set as invited_by
end
if current_user.errors.empty?
set_flash_message :notice, :send_instructions, :email => params[:multiple_emails]
respond_with current_user, :location => after_invite_path_for(current_user)
else
respond_with_navigational(current_user) { render :new }
end
end
end
end