First of all, this is a ruby question, not a ruby rail. Secondly, there are several conventions in Rails.And @layoutcertainly confuse other programmers, :maincoland :sidecol- quite a bad name, and they should be the ,.
<div class="maincol"><% @layout[:maincol].each do |element| %>
<%= "<div class="%s"></div>" % element %>
<% end %></div>
<div class="sidecol"></div>
source
share