Phoenix Flash Message: Revision history

Jump to: navigation, search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

27 December 2024

  • curprev 09:1209:12, 27 December 2024Admin talk contribs 672 bytes +39 No edit summary
  • curprev 09:1209:12, 27 December 2024Admin talk contribs 633 bytes +8 No edit summary
  • curprev 09:1109:11, 27 December 2024Admin talk contribs 625 bytes +625 Created page with "In Phoenix the flash message is invoked from the controller. <source> def create(conn, %{"doink" => doink_params}) do case Doinks.create_doink(doink_params) do {:ok, doink} -> conn |> put_flash(:info, "Doink created successfully.") |> redirect(to: ~p"/doinks/#{doink}") {:error, %Ecto.Changeset{} = changeset} -> render(conn, :new, changeset: changeset) end end </source> The message itself needs to be in the view..."