On 2013-02-11 22:07, FG wrote:
The problem I have with those is that they are designed for HTML. What if I wanted to make an email template instead?
Erb is like a Ruby preprocessor that can be used for any format. It's used for many things in Ruby on Rails:
index.html.erb - Erb preprocessor, result is HTML <% if foo %> <li>asd</li> <% end %> bar.js.coffee.erb - Erb then CoffeeScript preprocessor, result is JavaScript <% if foo %> bar = -> console.log("asd") <% end %> foo.text.erb - Erb preprocessor, result is plain text <% if foo %> asd <% end %> database.yml.erb - Erb preprocessor, result is YAML development: username: <%= username %> password: <%= password %> -- /Jacob Carlborg