Skip to content

Commit 4245b05

Browse files
authored
Merge pull request #730 from pow-auth/update-mail-layout-deprecation
Update mail layout deprecation instructions
2 parents 52368f6 + 9f77eaf commit 4245b05

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Removed deprecation warnings for Elixir 1.15.
6464

6565
This version is updated to work with Phoenix 1.7, in particular using the new template components structure. All views have been removed, and Pow no longer requires the `phoenix_view` dependency.
6666

67+
Instead of `pow_mailer_layout: {MyAppWeb.LayoutView, :email})` you should use `pow_mailer_layouts: [html: {MyAppWeb.Layouts, :email}, text: {MyAppWeb.Layouts, :email_text}]` in `conn.private`.
68+
6769
Now requires Elixir 1.12+.
6870

6971
### Enhancements

lib/pow/phoenix/mailer/mail.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ defmodule Pow.Phoenix.Mailer.Mail do
6161
defp handle_deprecated_layout(conn) do
6262
case Map.has_key?(conn.private, :pow_mailer_layout) do
6363
true ->
64-
IO.warn("`:pow_mailer_layout` in conn.private has been deprecated, please change it to `:pow_mailer_layouts`")
64+
IO.warn("`pow_mailer_layout: #{inspect conn.private[:pow_mailer_layout]}` in conn.private has been deprecated, please change it to `pow_mailer_layouts: [_: #{inspect conn.private[:pow_mailer_layout]}]`")
6565

6666
%{conn | private: Map.put(conn.private, :pow_mailer_layouts, _: conn.private[:pow_mailer_layout])}
6767

0 commit comments

Comments
 (0)