-
Recent Posts
Tags
array bash benchmark bug chrome cli configuration css diy editorial firefox fixes gotcha grub hack hardware html5 input instance_eval javascript jquery jsperf linux mouse multi touch multitouch nginx opera performance preferences prototype ruby snippet ssh syntax touch pad touchpad trackpad track pad ubuntu udev virtualbox web standards wii windowsRecent Comments
- force on The “Easy Way” to Add Custom DNS Servers in Ubuntu
- Ray on The “Easy Way” to Add Custom DNS Servers in Ubuntu
- Chema Gallego on Clone Ubuntu VMs in VirtualBox
- Ryan Finnie on Compacting a VMDK (Virtual Machine Disk Format image)
- Prevent Virtual Machines from Saving Network Interface udev Rules | splat operator on Clone Ubuntu VMs in VirtualBox
Archives
Categories
Meta
Tag Archives: binding
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 binding, context, erb, hash, instance_eval, openstruct, ruby, template
Leave a comment