我是haml的新手,这是我第一次使用它。我在Haml中有一个表单来创建标签。我正在接受
Syntax error: unexpected tString_DEND expecting ')'.
unexpected tIDENTIFIER, expecting ')'
haml_temp = f.content_tag :div, "", class: "container_button" do
产生错误的行是:
= f.text_area :tag_list, label: "Tags (optional)", help: raw("All tags .<br>We do this to ensure..."), input_html:{data:{placeholder: "Enter tags", saved: f.object.tags.map{|t|{id: t.name, name:t.name}}.to_json}, url: autocomplete_tags_path}, class: 'tagselect'}
你能帮帮忙吗?感谢
答案 0 :(得分:1)
您发布的f.textarea
行最后会额外加}
。这是没有无关}
= f.text_area :tag_list, label: "Tags (optional)", help: raw("All tags .<br>We do this to ensure..."), input_html:{data:{placeholder: "Enter tags", saved: f.object.tags.map{|t|{id: t.name, name:t.name}}.to_json}, url: autocomplete_tags_path}, class: 'tagselect'