From 8ae178a80c5413c59f6828233553c30c23c08783 Mon Sep 17 00:00:00 2001 From: meagharty <149533950+meagharty@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:56:48 -0500 Subject: [PATCH] refactor: fix syntax for first argument in pipeline Co-authored-by: Eddie Maldonado --- lib/arrow_web/live/shuttle_live/shuttle_live.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/arrow_web/live/shuttle_live/shuttle_live.ex b/lib/arrow_web/live/shuttle_live/shuttle_live.ex index 3648e8d6..97315460 100644 --- a/lib/arrow_web/live/shuttle_live/shuttle_live.ex +++ b/lib/arrow_web/live/shuttle_live/shuttle_live.ex @@ -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 @@ -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)}