5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rrails:Cloud9でのメール認証機能実装の際のdefault_url_optionsの設定内容。

Last updated at Posted at 2018-10-04

はじめに

Cloud9でRailsのdeviseを用いて開発する際、メール認証機能実装に必要なdefault_url_optionsの設定方法で躓いたため、備忘録を含め記録として残したいと思います。

結論

rails sをした後の、rootのURLをconfig.action_mailer.default_url_optionsに設定します。

私の場合ですと、以下のURLです。
スクリーンショット 2018-10-04 15.40.46.png

そのURLをhost:の後に記述します。
また、その際のprotocol'https'となります。

スクリーンショット 2018-10-04 15.44.53.png

config.action_mailer.default_url_options = { protocol: 'https' , host: 'rootのURLです。' }

余談ですが、
config.action_mailer.raise_delivery_errors = true
にしておくとでバックが容易になりますので、trueにすることを推奨いたします。

ご参考になりましたら幸いです。

5
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
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?