Pow.Extension.Phoenix.Messages (Pow v1.0.24) View Source

Module that handles messages for extensions.

To override messages from extensions, the method name has to start with the snake cased extension name. So the a_message/1 method from PowExtensionOne, should be written as pow_extension_one_a_message/1.

Usage

defmodule MyAppWeb.Pow.Messages do
  use Pow.Phoenix.Messages
  use Pow.Extension.Phoenix.Messages,
    extensions: [PowExtensionOne, PowExtensionTwo]

  import MyAppWeb.Gettext

  def pow_extension_one_a_message(_conn), do: gettext("A message.")

  def pow_extension_two_a_message(_conn), do: gettext("A message.")
end

Remember to update configuration with messages_backend: MyAppWeb.Pow.Messages.

Link to this section Summary

Functions

Generates a namespaced method name for a message method.

Link to this section Functions

Link to this function

method_name(extension, type)

View Source

Specs

method_name(atom(), atom()) :: atom()

Generates a namespaced method name for a message method.