Current section

192 Versions

Jump to

Compare versions

7 files changed
+30 additions
-6 deletions
  @@ -5,6 +5,15 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
5 5
6 6 <!-- changelog -->
7 7
8 + ## [v2.1.19](https://github.com/ash-project/ash_phoenix/compare/v2.1.18...v2.1.19) (2025-03-04)
9 +
10 +
11 +
12 +
13 + ### Bug Fixes:
14 +
15 + * handle case w/ set list of join attributes
16 +
8 17 ## [v2.1.18](https://github.com/ash-project/ash_phoenix/compare/v2.1.17...v2.1.18) (2025-02-10)
  @@ -15,7 +15,7 @@ Welcome! This is the package for integrating [Phoenix Framework](https://www.pho
15 15 Add `ash_phoenix` to your list of dependencies in `mix.exs`:
16 16
17 17 ```elixir
18 - {:ash_phoenix, "~> 2.1.18"}
18 + {:ash_phoenix, "~> 2.1.19"}
19 19 ```
20 20
21 21 ## Whats in the box?
  @@ -1,7 +1,7 @@
1 1 {<<"links">>,
2 2 [{<<"GitHub">>,<<"https://github.com/ash-project/ash_phoenix">>}]}.
3 3 {<<"name">>,<<"ash_phoenix">>}.
4 - {<<"version">>,<<"2.1.18">>}.
4 + {<<"version">>,<<"2.1.19">>}.
5 5 {<<"description">>,<<"Utilities for integrating Ash and Phoenix">>}.
6 6 {<<"elixir">>,<<"~> 1.11">>}.
7 7 {<<"files">>,
  @@ -642,6 +642,19 @@ defmodule AshPhoenix.Form.Auto do
642 642 [] ->
643 643 opts
644 644
645 + [{source_dest_or_join, action_name, _} | rest] ->
646 + resource = rel_to_resource(source_dest_or_join, relationship)
647 +
648 + opts
649 + |> Keyword.put(:update_resource, resource)
650 + |> Keyword.put(:update_action, action_name)
651 + |> Keyword.update!(
652 + :forms,
653 + &(&1 ++
654 + auto(resource, action_name, auto_opts))
655 + )
656 + |> add_join_form(relationship, rest, manage_opts)
657 +
645 658 [{source_dest_or_join, action_name} | rest] ->
646 659 resource = rel_to_resource(source_dest_or_join, relationship)
  @@ -63,12 +63,12 @@ defmodule AshPhoenix.Form do
63 63 {:ok, assign(socket, form: MyApp.Accounts.form_to_register_with_password() |> to_form())}
64 64 end
65 65
66 - def handle_event(socket, "validate", %{"form" => params}) do
66 + def handle_event("validate", %{"form" => params}, socket) do
67 67 form = AshPhoenix.Form.validate(socket.assigns.form, params)
68 68 {:noreply, assign(socket, :form, form)}
69 69 end
70 70
71 - def handle_event(socket, "submit", %{"form" => params}) do
71 + def handle_event("submit", %{"form" => params}, socket) do
72 72 case AshPhoenix.Form.submit(socket.assigns.form, params: params) do
73 73 {:ok, _user} ->
74 74 socket =
Loading more files…