We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 042ce91 commit bd589f1Copy full SHA for bd589f1
priv/templates/phx.gen.live/show.ex
@@ -27,13 +27,8 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
27
end
28
29
@impl true
30
- def mount(_params, _session, socket) do
31
- {:ok, socket}
32
- end
33
-
34
- @impl true
35
- def handle_params(%{"id" => id}, _, socket) do
36
- {:noreply,
+ def mount(%{"id" => id}, _session, socket) do
+ {:ok,
37
socket
38
|> assign(:page_title, "Show <%= schema.human_singular %>")
39
|> assign(:<%= schema.singular %>, <%= inspect context.alias %>.get_<%= schema.singular %>!(id))}
0 commit comments