我的 field_for 抛出语法错误,我不知道为什么?我该怎么缩进这个?
Inconsistent indentation: "\t " used for indentation, but the rest of the document was indented using 1 tab.
= form_for(:contacts, url: contacts_path) do |f|
= f.error_messages
= f.label :subject, "Name"
%span{style: 'color: red'} *
= f.text_field :subject, class: "text_field width_100_percent"
%br
%br
= f.label "Email"
%span{style: 'color: red'} *
%br
= f.email_field :email, class: "text_field width_100_percent"
%br
%br
= f.label "Phone"
%br
= f.fields_for :custom_field do |cust|
= cust.text_field :phone_number_28445
%br
%br
= f.label "Question(s), and/or feedback"
%span{style: 'color: red'} *
%br
= f.text_area :description, class: "text_field width_100_percent", style: 'height: 100px;'
%br
%br
= f.submit "Submit", class: 'btn btn-warning'
我知道它是我的 field_for,因为一旦我把它拿出来,表格就会再次起作用