diff --git a/documentation/tutorials/getting-started-with-ash-and-phoenix.md b/documentation/tutorials/getting-started-with-ash-and-phoenix.md
index 36eb0d7..ca680af 100644
--- a/documentation/tutorials/getting-started-with-ash-and-phoenix.md
+++ b/documentation/tutorials/getting-started-with-ash-and-phoenix.md
@@ -85,7 +85,6 @@ defmodule MyAshPhoenixApp.Blog do
# Define an interface for calling resource actions.
define :create_post, action: :create
define :list_posts, action: :read
- define :update_post, action: :update
define :destroy_post, action: :destroy
define :get_post, args: [:id], action: :by_id
end
@@ -355,13 +354,6 @@ defmodule MyAshPhoenixAppWeb.PostsLive do
<.input type="text" field={f[:title]} placeholder="input title" />
<.button class="mt-2" type="submit">Create
-
Update Post
- <.form :let={f} for={@update_form} phx-submit="update_post">
- <.label>Post Name
- <.input type="select" field={f[:post_id]} options={@post_selector} />
- <.input type="text" field={f[:content]} placeholder="input content" />
- <.button class="mt-2" type="submit">Update
-
"""
end
@@ -372,8 +364,7 @@ defmodule MyAshPhoenixAppWeb.PostsLive do
assign(socket,
posts: posts,
post_selector: post_selector(posts),
- create_form: AshPhoenix.Form.for_create(Post, :create) |> to_form(),
- update_form: AshPhoenix.Form.for_update(List.first(posts, %Post{}), :update) |> to_form()
+ create_form: AshPhoenix.Form.for_create(Post, :create) |> to_form()
)
{:ok, socket}
@@ -398,18 +389,6 @@ defmodule MyAshPhoenixAppWeb.PostsLive do
end
end
- def handle_event("update_post", %{"form" => form_params}, socket) do
- case AshPhoenix.Form.submit(socket.assigns.update_form, params: form_params) do
- {:ok, _post} ->
- posts = Blog.list_posts!()
-
- {:noreply, assign(socket, posts: posts, post_selector: post_selector(posts))}
-
- {:error, update_form} ->
- {:noreply, assign(socket, update_form: update_form)}
- end
- end
-
defp post_selector(posts) do
for post <- posts do
{post.title, post.id}