Skip to content

Commit

Permalink
refactor: fix syntax for first argument in pipeline
Browse files Browse the repository at this point in the history
Co-authored-by: Eddie Maldonado <[email protected]>
  • Loading branch information
meagharty and lemald authored Nov 7, 2024
1 parent e5f07f3 commit 8ae178a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/arrow_web/live/shuttle_live/shuttle_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ defmodule ArrowWeb.ShuttleViewLive do

gtfs_disruptable_routes = Shuttles.list_disruptable_routes()
shapes = Shuttles.list_shapes()
form = to_form(Shuttles.change_shuttle(shuttle))
form = shuttle |> Shuttles.change_shuttle() |> to_form()

socket =
socket
Expand All @@ -157,7 +157,8 @@ defmodule ArrowWeb.ShuttleViewLive do

def handle_event("validate", %{"shuttle" => shuttle_params}, socket) do
form =
Shuttles.change_shuttle(socket.assigns.shuttle, shuttle_params)
socket.assigns.shuttle
|> Shuttles.change_shuttle(shuttle_params)
|> to_form(action: :validate)

{:noreply, assign(socket, form: form)}
Expand Down

0 comments on commit 8ae178a

Please sign in to comment.