-1
任何人都可以看到为什么我会在我的代码中得到这个错误?HAML - “期待输入结束”Ruby错误
如果我删除错误捕获工作正常,但无法看到错误捕获问题。
感谢
= simple_form_for @pic, html: { multipart: true } do |f|
- if @pic.errors.any?
#errors
%h2
= pluralize(@pic.errors.count, "error")
prevented this Pic from saving
%ul
- @pic.errors.full_message.each do |msg|
%li= msg
.form-group
= f.input :title, input_html: { class: 'form-control' }
.form-group
= f.input :description, input_html: { class: 'form_control' }
= f.button :submit, class: "btn btn-info"
仔细检查缩进和间距。 –
你可以检查你的缩进,并确保它是一致的吗?欲了解更多信息[检查此](http://haml.info/docs/yardoc/#indentation)。还要确保你的缩进符合application.html.haml – alexunger