I'm looking up how HAML works and I've found documentation that assumes an understanding of ERB. I know nothing other than it relates to Ruby. I also know very little about ruby. I don't deal with server side languages often but when I do it's PHP. Can anyone give me a summary of ERB? I'd like to start working with HAML and so I think I need to understand a few things first.
ERB is Embedded Ruby. It is often used to embed Ruby code in an HTML document within Rails.
HAML is a RubyGem which is essentially the same thing as ERB but with a different syntax.
Here is a sample of ERB:
Here is the same code converted to HAML:
<h1><%= post.title %></h1>
<h2><%= post.subtitle %></h2>
<%= post.content %>