Skip to content

Commit

Permalink
improvement: raise an error on usage of old option name
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Aug 1, 2024
1 parent ee2626d commit 92674c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ash_phoenix/form/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,11 @@ defmodule AshPhoenix.Form do
end

def submit(form, opts) do
if opts[:api_opts] do
raise ArgumentError, """
The `api_opts` option has been renamed to `action_opts`. Please update your code accordingly.
"""
end
changeset_opts =
Keyword.drop(form.opts, [:forms, :errors, :id, :method, :for, :as])

Expand Down

0 comments on commit 92674c5

Please sign in to comment.