You have a render nested inside another render.. I think thats the problem.
Up vote 1 down vote favorite share g+ share fb share tw.
I am trying to DRY up some code in HAML, but seem to have stumbled into a whitespace error that I can't quite wrap my head around. I took the header and left navigation code and put it into their own respective files in the layouts folder. In the 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 header file, I have: / main container area #maincontainer / main content #maincontent. Mhauto And in the left navigation file, I have: / left navigation column #leftNav.leftNav. Left / a bunch of code goes in here / end left navigation column Now, I would expect this to be equivalent to: / main container area #maincontainer / main content #maincontent.
Mhauto / left navigation column #leftNav.leftNav. Left / 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 whatever reason, it is not working correctly and instead gives me this syntax error syntax error, unexpected keyword_ensure, expecting $end while pointing to the last line in the file.
What am I doing wrong? This is my first time using HAML, so this is rather perplexing to me. By the way, it worked perfectly fine before I started DRYing up the code, so this seems to be a whitespace thing to me.
Ruby-on-rails haml syntax-error link|improve this question asked Mar 3 '11 at 19:38iWasRobbed11.5k41750 95% accept rate.
You have a render nested inside another render.. I think thats the problem: = 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.
– iWasRobbed Mar 3 '11 at 19:43 If you want left_navigation within the header you just render it inside the header partial. If you don't want it to be render always then you should use a content_for :header – Fernando Diaz Garrido Mar 3 '11 at 20:22.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.