Created
January 30, 2009 15:39
-
-
Save ihower/55110 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helper | |
def grid_row( cols ) | |
out = "" | |
cols.each do |col| | |
out << "<div class=\"grid_#{col[0]}\">#{col[1]}</div>" | |
end | |
return out | |
end | |
# View code | |
<% @foo = capture do %> | |
<p>foooo</p> | |
<% end -%> | |
<% @bar = capture do %> | |
<p>barrrr</p> | |
<% end -%> | |
<%= grid_row( [ [10,@foo], [30,@bar], [20, (render :partial => "blah") ] ] ) %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment