You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2020. It is now read-only.
# An existing model makes an update form and fills out field values:
<%= form_with model: Post.first do |form| %>
<%= form.text_field :title %>
<% end %>
# =>
<form action="/posts/1" method="post" data-remote="true">
<input type="hidden" name="_method" value="patch">
<input type="text" name="post[title]" value="<the title of the post>">
</form>
# Though the fields don't have to correspond to model attributes:
<%= form_with model: Cat.new do |form| %>
<%= form.text_field :cats_dont_have_gills %>
<%= form.text_field :but_in_forms_they_can %>
<% end %>
# =>
<form action="/cats" method="post" data-remote="true">
<input type="text" name="cat[cats_dont_have_gills]">
<input type="text" name="cat[but_in_forms_they_can]">
</form>
Currently, I use rails 5.1.2 and because of above, posted an PR.
Could you try to create some form with using form_with method?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@paul-at Thank you for providing an awesome gem.
I'd like to contribute to your repo. I found that it goes wrong when I use form_with method because of the line as below.
https://github.com/paul-at/quill-rails5/blob/master/lib/quill/rails5/view_helpers.rb#L42
The error log is here.
form_with method doesn't generate
form.options[:html][:id]
So, I needed to set an form id like this after that it successfully worked.
How do I fix this problem and push PR?
FYI: DHH said that rails should unify form_tag and form_for into form_with.
rails/rails#25197
The text was updated successfully, but these errors were encountered: