We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4d9457 commit 26cae80Copy full SHA for 26cae80
lib/generators/haml/scaffold/templates/_form.html.haml
@@ -1,4 +1,8 @@
1
+<% if Rails::VERSION::MAJOR >= 5 && Rails::VERSION::MINOR >= 1 -%>
2
+= form_with model: @<%= singular_table_name %>, local: true do |f|
3
+<% else -%>
4
= form_for @<%= singular_table_name %> do |f|
5
+<% end -%>
6
- if @<%= singular_table_name %>.errors.any?
7
#error_explanation
8
%h2= "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
0 commit comments