1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #28406 from chukitow/feature/user-form-with-instead-of-form-for-scaffold

user form with instead of form for in scaffold generator
This commit is contained in:
Kasper Timm Hansen 2017-03-20 19:49:00 +01:00 committed by GitHub
commit 8534d2e179

View file

@ -1,4 +1,4 @@
<%%= form_for(<%= singular_table_name %>) do |f| %>
<%%= form_with(model: <%= singular_table_name %>, local: true) do |f| %>
<%% if <%= singular_table_name %>.errors.any? %>
<div id="error_explanation">
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>