Skip to content

Commit d3b798b

Browse files
kaspthrafaelfranca
authored andcommitted
Merge pull request rails#28406 from chukitow/feature/user-form-with-instead-of-form-for-scaffold
user form with instead of form for in scaffold generator
1 parent bbee1c0 commit d3b798b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%%= form_for(<%= singular_table_name %>) do |f| %>
1+
<%%= form_with(model: <%= singular_table_name %>, local: true) do |f| %>
22
<%% if <%= singular_table_name %>.errors.any? %>
33
<div id="error_explanation">
44
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>

0 commit comments

Comments
 (0)