Haml::SyntaxError in Recipes#new
Showing /home/shoaib/Documents/Projects/recipe_box/app/views/recipes/_form.html.haml where line #4 raised:
The line was indented 4 levels deeper than the previous line.
Extracted source (around line #4):
2
3
4
5
6
7
- if @recipe.errors.any?
#errors
%p
= @recipe.errors.count
Prevented this recipe froms saving
%ul
在#errors
之前添加两个空格。 Haml缩进是它的基础,它定义了它的代码块而不是使用结束行,所以你必须尊重它,你应该只有空格(而不是制表符)并且总是相同的数量(约定是2个空格)。