【发布时间】:2016-07-16 06:27:18
【问题描述】:
创建用户时会自动发送确认邮件。但是我需要在完成更多步骤后手动通过代码发送邮件。
我无法阻止发送确认邮件。
用户模型
class User < ActiveRecord::Base
include DeviseTokenAuth::Concerns::User
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable,
:confirmable
before_create :skip_confirmation_notification!
我正在使用 devise_token_auth 和 Grape API for rails。
注意:如果我尝试使用 skip_confirmation!,它可以完美运行,没有任何缺陷。但我不需要该功能,因为我只想通过发送到他们邮件的确认链接来确认用户。
【问题讨论】:
标签: ruby-on-rails devise devise-confirmable