= table_helper +table_helper+ adds a helper method for generating HTML tables from collections. == Resources API * http://api.pluginaweek.org/table_helper Bugs * http://pluginaweek.lighthouseapp.com/projects/13290-table_helper Development * http://github.com/pluginaweek/table_helper Source * git://github.com/pluginaweek/table_helper.git == Description Tables of summary data for ActiveRecord models are often formatted in the same way by creating a header indicating the attribute and a body containing the data from each record in separate rows. table_helper makes it easier to create these types of tables by DRYing much of the html being generated. == Usage === Basic Example <%= collection_table Person.find(:all) %> ...is compiled to (formatted here for the sake of sanity):
First Name | Last Name | Company | Role | ||
---|---|---|---|---|---|
John | Doe | 1 | President | ||
Jane | Doe | 1 | Vice-President |
Title | Category | Author | Date Published |
# Comments | # Trackbacks |
---|---|---|---|---|---|
Open-source projects: The good, the bad, and the ugly | General | John Doe | 23 days | - | - |
5 reasons you should care about Rails | Rails | John Q. PUblic | 21 days | - | - |
Deprecation: Stop digging yourself a hole | Rails | Jane Doe | 17 days | - | - |
Jumpstart your Rails career at RailsConf 2007 | Conferences | Jane Doe | 4 days | - | - |
Getting some REST | Rails | John Doe | about 18 hours | - | - |
0 | 0 |