Created
March 9, 2009 18:36
-
-
Save texel/76410 to your computer and use it in GitHub Desktop.
This file contains 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
<% | |
# table_for @discount_codes do |table| | |
# table.column :id, :label => 'ID' | |
# table.column :code | |
# table.column :max_uses, :label => 'Maximum Uses' do |discount_code| | |
# discount_code.max_uses || 'Unlimited' | |
# end | |
# end | |
# would generate something like this... | |
%> | |
<div class="table"> | |
<table cellspacing="0" cellpadding="0"> | |
<colgroup> | |
<col class="id"> | |
<col class="code"> | |
<col class="max_uses"> | |
</colgroup> | |
<thead> | |
<tr> | |
<th>ID</th> | |
<th>Code</th> | |
<th>Maximum Uses</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr class=""> | |
<td>12</td> | |
<td>nonprofit1</td> | |
<td>1</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment