获得上述错误(列出的错误行号是在文件结尾之后)
%H1= 'Week '+@week
-@days.each |day| #do
%H2= 'Day '+day
%table{:id => "day_#{day}"}
%thead
%tr
%th Back Squat (reps)
%th %1RM
%th Weight
%th Front Squat (reps)
%th %1RM
%th Weight
%tbody
-@workout[day].each |set| #do
%tr
%td= set.first.reps
%td= 100 * set.first.percentage
%td= set.first.percentage * @bs_1rm
-unless set.last.nil?
%td= set.last.reps
%td= 100 * set.last.percentage
%td= set.last.percentage * @fs_1rm
-else
%td/
%td/
%td/
有什么想法吗?在HAML中,它通常是缩进问题,但我没有看到它......
答案 0 :(得分:3)
此:
-@days.each |day| #do
应该是:
- @days.each do |day|
使用haml,您不会end
阻止,但您必须使用do