We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0079ad0 commit 21f72f3Copy full SHA for 21f72f3
priv/templates/phx.gen.live/show.ex
@@ -27,14 +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,
37
- socket
+ def mount(%{"id" => id}, _session, socket) do
+ {:ok, socket
38
|> assign(:page_title, "Show <%= schema.human_singular %>")
39
|> assign(:<%= schema.singular %>, <%= inspect context.alias %>.get_<%= schema.singular %>!(id))}
40
0 commit comments