mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Improve specs and handle invalid email token
Follow-up to 7977b09025
This commit is contained in:
@@ -221,6 +221,7 @@ class InvitesController < ApplicationController
|
||||
|
||||
def send_activation_email(user)
|
||||
email_token = user.email_tokens.create(email: user.email)
|
||||
raise ActiveRecord::RecordInvalid.new(email_token) if !email_token.persisted?
|
||||
|
||||
Jobs.enqueue(:critical_user_email,
|
||||
type: :signup,
|
||||
|
||||
Reference in New Issue
Block a user