On Jun 1, 2020, at 6:06 PM, alizain via phoenix-core <phoeni...@googlegroups.com> wrote:
Right now, Phoenix uses a map to store flashes. Therefore, it is not possible to set multiple flash messages for the same key (`info`, `error`, etc...)What do you think about changing the underlying data structure to a keyword list, so that there is no such limitation.
--
You received this message because you are subscribed to the Google Groups "phoenix-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoenix-core...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/phoenix-core/eed72dc1-38b2-4ee0-b627-14f8eeded119%40googlegroups.com.
Please see previous discussions on this. Thanks!
On Jun 1, 2020, at 6:06 PM, alizain via phoenix-core <phoeni...@googlegroups.com> wrote:
Right now, Phoenix uses a map to store flashes. Therefore, it is not possible to set multiple flash messages for the same key (`info`, `error`, etc...)What do you think about changing the underlying data structure to a keyword list, so that there is no such limitation.--
You received this message because you are subscribed to the Google Groups "phoenix-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoeni...@googlegroups.com.
# Defined somewhere
def random_key, do: ...
# In the controller
put_flash(conn, random_key(), {:error, message})
# In the view
<%= for {type, message} <- get_flash(conn) do %>
...
<% end %>