Hi! Rails 5.1 introduced form_with which unifies form_for and form_tag, allowing great capabilities.
How will this be compatible with it?
Would like to know this as well.
config/initializers/simple_form.rb:177:in block in <top (required)>': undefined methodalias_method_chain' for SimpleForm::FormBuilder:Class (NoMethodError)
Já teria uma solução para esse erro?
Would you have a solution to this error?
ruby 2.4.1 with rails 5.1.1
@Losangelo yes. Make sure you are using latest simple_form
form_with uses different default that form_for and those defaults conflicts with simple form features. Things like generating ids for fields are disabled in form_with and this breaks basic premisses of simple form that expects the ids to be available so the labels works automatically. Because of this we don't plan to support the form_with syntax for simple form.
@rafaelfranca Does this suggest you're revisiting this issue or will simple_form stop working once form_for is removed from Rails?
form_for will not be remove from Rails.
We could support form_with now in simple_form but since simple_form expects a form builder and form_with depending on the arguments doesn't provide one, it is going to require more work to support it than I'm willing to do.
form_forwill not be remove from Rails.
You might know something I don't here; I'm just referencing @dhh's comments from his original proposal for form_with where he said he'd like to deprecate both form_for and form_tag by Rails 6, and “I would consider form_for soft-deprecated after we get form_with.”
There was also talk of rebuilding both to run on top of form_with, but I don't know if that work proceeded past conception.
it is going to require more work to support it than I'm willing to do.
Is this something you would fold in if someone else in the community did the legwork, or is it out of the question for you?
Is this something you would fold in if someone else in the community did the legwork, or is it out of the question for you?
Of course! If someone wants to work on it I'd be happily accept.
Most helpful comment
You might know something I don't here; I'm just referencing @dhh's comments from his original proposal for
form_withwhere he said he'd like to deprecate bothform_forandform_tagby Rails 6, and “I would consider form_for soft-deprecated after we get form_with.”There was also talk of rebuilding both to run on top of
form_with, but I don't know if that work proceeded past conception.Is this something you would fold in if someone else in the community did the legwork, or is it out of the question for you?