4
我正在尝试将ERB布局转换为HAML。HAML Form For Rails
这是我不断收到错误:
index.html.haml:18: syntax error, unexpected ')'
));}\n #{_hamlout.format_...
这里是HAML页:
.row-fluid
.span6
%h2 Todo List
.span6
%h2{:style => "text-align:right;"} <script>document.write(today)</script>
%hr.divider
.row-fluid
.span6
%h2.small_head New Task
= render :partial => 'layouts/form_errors', :locals => {:object => @list}
.form
= form_for :list, :url => {:controller => 'lists', :action => 'create'} do |f|
= label_tag :list_name, "Title", :class => 'header_label'
我也试过这是一个变化:
= form_for(:list, :url => {:controller => 'lists', :action => 'create'}) do |f|
= label_tag(:list_name, "Title", :class => 'header_label')
无论工作并且都会生成相同的错误消息,并且非常感谢。
谢谢,我不知道我怎么没看到。 – 2013-05-07 23:51:00