從文檔我認爲它不應該發送確認電子郵件,但它是這樣做的。如何避免devise_invitable發送確認郵件?
這裏是我的invitable動作設定:
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
但是如果你想確認沒有邀請的用戶註冊? – daslicious 2015-12-31 21:12:11