0
0

【DeviseTokenAuth】パスワード変更時に変更通知メールを送信する方法

Posted at

設定を記述

設定を記述する。

config/initializers/devise.rb
Devise.setup do |config|
  # ...
  config.send_password_change_notification = true
end


メール内容の変更

メール内容を変更する。

app/views/devise/mailer/password_change.html.erb
<p><%= t(:hello).capitalize + '、' + @resource.name %>さん。</p>

<p><%= @resource.email %>のパスワードが変更されました。</p>

参考ページ

0
0
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
0
0