Closed pmareke closed 3 months ago
Hi @pmareke,
support for passing a conn to forms was removed in phoenix_html 4.0: https://github.com/phoenixframework/phoenix_html/commit/0be2c6f1fab4fa3655de4bae90ae0a87649c8779#diff-70098bfc9e8cc88bd84dc5bc85760a5599409295be3232468810d6a81fa515c2L85
This should probably be part of the phoenix_html changelog...
Instead of @conn
, you can simply pass @conn.params
instead.
Environment
Actual behavior
If in an new Phoenix project (I'm following the example from the Phoenix Programming 1.4 but with the latest Phoenix version) I try to create a
simple_form
with the%Plug.Conn{}
struct in thefor
property:The app crashes with the following error
Expected behavior
As soon as I used en empty struct or a nil, the app works perfectly.
PD: I replicate the error in a new Phoenix ap, without anything else rather than the
simple_form
and the error happens in the same way.