mirror of
https://github.com/ash-project/ash_hq.git
synced 2024-09-19 12:53:49 +12:00
chore: remove old code
This commit is contained in:
parent
834da130c3
commit
d00ed5c2dc
1 changed files with 1 additions and 21 deletions
|
@ -486,12 +486,7 @@ defmodule AshHqWeb.Pages.Home do
|
|||
socket,
|
||||
signed_up: false,
|
||||
contributor_count: Enum.count(contributors),
|
||||
contributors: contributors,
|
||||
email_form:
|
||||
AshPhoenix.Form.for_create(AshHq.MailingList.Email, :create,
|
||||
upsert?: true,
|
||||
upsert_identity: :unique_email
|
||||
)
|
||||
contributors: contributors
|
||||
)}
|
||||
end
|
||||
|
||||
|
@ -503,21 +498,6 @@ defmodule AshHqWeb.Pages.Home do
|
|||
end
|
||||
end
|
||||
|
||||
def handle_event("validate_email_form", %{"form" => form}, socket) do
|
||||
{:noreply,
|
||||
assign(socket, email_form: AshPhoenix.Form.validate(socket.assigns.email_form, form))}
|
||||
end
|
||||
|
||||
def handle_event("submit_email_form", _, socket) do
|
||||
case AshPhoenix.Form.submit(socket.assigns.email_form) do
|
||||
{:ok, _} ->
|
||||
{:noreply, assign(socket, :signed_up, true)}
|
||||
|
||||
{:error, form} ->
|
||||
{:noreply, assign(socket, email_form: form)}
|
||||
end
|
||||
end
|
||||
|
||||
@changeset_example """
|
||||
post = Example.Post.create!(%{
|
||||
text: "Declarative programming is fun!"
|
||||
|
|
Loading…
Reference in a new issue