Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Created July 27, 2010 22:38
Show Gist options
  • Save chriseppstein/492997 to your computer and use it in GitHub Desktop.
Save chriseppstein/492997 to your computer and use it in GitHub Desktop.
%=table_row(id, *args)
%tr{:id => id}
-args.each do |arg|
%td= arg
%table
%+table_row("row1", "col1", "col2", "col3")
<table>
<tr id="row1">
<td>col1</td>
<td>col2</td>
<td>col3</td>
</tr>
</table>
@jeroenvandijk
Copy link

Interesting. I think this would be very powerful. I can imagine that together with compass this could result in a very cool web widget framework or however you would name that. How hard would it be to implement this in the Haml parser? I had a look at it just before and couldn't really tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment