Skip to content

Commit

Permalink
Improve error message in phoenix_html
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Aug 31, 2023
1 parent 2a57389 commit d96e87a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/phoenix_html/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ defmodule Phoenix.HTML.Form do
defimpl Phoenix.HTML.Safe do
def to_iodata(%{action: action, options: options}) do
IO.warn(
"form_for/3 without an anonymous function is deprecated. " <>
"If you are using Phoenix.LiveView, use the new Phoenix.Component.form/1 component"
"rendering a Phoenix.HTML.Form as part of HTML is deprecated, " <>
"please extract the component you want to render instead. " <>
"If you want to build a form, use form_for/3 or <.form> in LiveView"
)

{:safe, contents} = form_tag(action, options)
Expand Down

0 comments on commit d96e87a

Please sign in to comment.