I am trying to dry some code in HAML, but it seems to have stumbled upon a space error that I cannot completely wrap around.
I took the title and left the navigation code and put it in my respective files in the folder layouts
.
In regular view files, I placed this at the top:
= render 'layouts/header'
= render 'layouts/left_navigation'
/ center content column
.centerContent.left.phm.rbm
/ start main center section
/ and the rest of the code goes below here
In the file header
I have:
/ main container area
/ main content
And in the file left navigation
I have:
/ left navigation column
/ a bunch of code goes in here
/ end left navigation column
Now I expect this to be equivalent:
/ main container area
/ main content
/ left navigation column
/ a bunch of code goes in here
/ end left navigation column
/ center content column
.centerContent.left.phm.rbm
/ start main center section
/ and the rest of the code goes below here
But for some reason, it does not work correctly and instead gives me this syntax error syntax error, unexpected keyword_ensure, expecting $end
, pointing to the last line in the file. What am I doing wrong? This is my first time using HAML, so it puzzles me quite a bit.
, , DRYing , .