Skip to content

Commit

Permalink
Merge pull request #193 from taketo1113/fix-error-with-namespace
Browse files Browse the repository at this point in the history
Fix ActionView::SyntaxErrorInTemplate when scaffolding with namespace
  • Loading branch information
januszm authored Oct 24, 2023
2 parents 7934083 + b2e668e commit 3246626
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/generators/slim/scaffold/templates/_form.html.slim.tt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= form_with(model: @<%= model_resource_name %>) do |form|
- if @<%= singular_table_name %>.errors.any?
= form_with(model: <%= model_resource_name %>) do |form|
- if <%= singular_table_name %>.errors.any?
div style="color: red"
h2 = "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
h2 = "#{pluralize(<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
ul
- @<%= singular_table_name %>.errors.each do |error|
- <%= singular_table_name %>.errors.each do |error|
li = error.full_message

<% attributes.each do |attribute| -%>
Expand Down

0 comments on commit 3246626

Please sign in to comment.