I am still learning HAML and I have some syntax that I am not clear about.
When I see code like this:
-content_for :primary_content do
.content_container
What does the content_for block do and mean? Is that a call to a specific layout? Or is .content_container a class somewhere?
The reason I ask is because I have some links that appear on the page and I am not sure why they appear there. I wonder if primary_content gets a block of code to render? If so, how do I find or look up this block of code?
Thanks!
Your HAML is roughly equivalent to the following ERB:
Essentially, “content_for :symbol” defines a named piece of content that will later be included in a layout or something.
.somethingis a HAML short-hand way of saying “make me a div which CSS class issomething“.