Introduction
ERB lets you mix Ruby code with HTML to create dynamic web pages easily.
When you want to show data from Ruby variables inside an HTML page.
When you need to run simple Ruby code like loops or conditions inside HTML.
When building views in a Ruby on Rails web application.
When you want to insert user input or database content into a webpage.
When you want to keep your HTML and Ruby code together for easier editing.