Tag Archives: openstruct

Render a template from a hash in Ruby

A hash is a great way to manage a list of key/value pairs, and templates are a great way to render content. So here’s a simple way to render a template from a hash. template.erb My favorite color is <%= … Continue reading

Posted in ruby | Tagged , , , , , , , | 1 Comment