在我的項目,我使用haml
編寫的意見,並在此部分,服務器顯示syntax error, unexpected keyword_ensure, expecting end-of-input
錯誤:Haml的:語法錯誤,意想不到的keyword_ensure,預計最終的輸入
.col-xs-12#new_posts_form
%h2= "New posts"
= form_tag admin_articles_posts_path
- @posts.each_with_index do |post,i|
= fields_for "posts[#{i}]", post do |f|
.col-xs-12
%label Content
= f.text_area :content, placeholder: "Content", class: "form-control"
.col-xs-12
%label Publishing date
=f.date_field :start_date, placeholder: "yyyy-mm-dd", class: "form-control"
.col-xs-12
= f.submit "Next", class: "btn btn-default"
錯誤點第13行,最後一個。
我想 「做」 丟失=的form_tag admin_articles_posts_path – chaitanya
沒錯,就是它!你能寫一個答案來選擇它嗎? –