Skip to content

Commit

Permalink
Rename change to attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo0807 committed Feb 6, 2024
1 parent a797bb3 commit 0aa9a5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/backpex/item_actions/item_action.ex
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ defmodule Backpex.ItemAction do
"""
@callback changeset(
item :: Ecto.Changeset.t(),
change ::
attrs ::
Ecto.Schema.t()
| Ecto.Changeset.t()
| {Ecto.Changeset.data(), Ecto.Changeset.types()},
Expand Down Expand Up @@ -183,7 +183,7 @@ defmodule Backpex.ItemAction do
@callback handle(socket :: Phoenix.LiveView.Socket.t(), items :: list(map()), params :: map()) ::
{:noreply, Phoenix.LiveView.Socket.t()} | {:reply, map(), Phoenix.LiveView.Socket.t()}

@optional_callbacks confirm: 1, confirm_label: 1, cancel_label: 1, changeset: 4, fields: 0
@optional_callbacks confirm: 1, confirm_label: 1, cancel_label: 1, fields: 0, changeset: 4

@doc """
Defines `Backpex.ItemAction` behaviour and provides default implementations.
Expand All @@ -207,7 +207,7 @@ defmodule Backpex.ItemAction do
def fields, do: []

@impl Backpex.ItemAction
def changeset(_item, _change, _target, assigns), do: Ecto.Changeset.change(init_change(assigns))
def changeset(_item, _attrs, _target, assigns), do: Ecto.Changeset.change(init_change(assigns))

@impl Backpex.ItemAction
def init_change(_assigns) do
Expand Down

0 comments on commit 0aa9a5f

Please sign in to comment.