2
這裏顯示的錯誤消息是我的表格:與HAML
= form_for @talent do |f|
- if @talent.errors.any?
#error_explanation
%h2= pluralize(@talent.errors.count, "error")
"prohibited this user from being saved:"
%ul - @talent.errors.full_messages.each do |msg|
%li= msg
= f.label :First_Name
= f.text_field :first_name
= f.label :Last_Name
= f.text_field :last_name
= f.label :City
= f.text_field :city
= f.label :State
= f.text_field :state
= f.label :Zip_code
= f.text_field :zip_code
= f.label :Email
= f.text_field :email
= f.submit "Create"
這是我的錯誤信息:
Illegal nesting: nesting within plain text is illegal.
Extracted source (around line #7):
4: #error_explanation
5: %h2= pluralize(@talent.errors.count, "error")
6: "prohibited this user from being saved:"
7: %ul - @talent.errors.full_messages.each do |msg|
8: %li= msg
9:
10: = f.label :First_Name
我想不出什麼我做錯了。