LoginSignup
4
1

More than 5 years have passed since last update.

devise_token_auth導入時、ユーザ登録確認メールが送られない事象の対応方法

Last updated at Posted at 2016-08-18

現象

  • devise_token_authのバージョン「0.1.39」を導入し、下記のように設定を行ったが、ユーザ登録の確認メールが届かなくなる
  • ちなみにinclude DeviseTokenAuth::Concerns::Userを削除すると届くようになる
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable,
         :confirmable, :omniauthable
  include DeviseTokenAuth::Concerns::User

解決方法

  after_create :send_confirmation_email, if: -> { User.devise_modules.include?(:confirmable) }
  private
  def send_confirmation_email
    self.send_confirmation_instructions
  end

まとめ

  • バグなのか分かりませんが、正式な対応方法をご存知の方いらっしゃいましたら教えていただけると嬉しいです。
4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1