Awesome_tables is a project mainly written in Ruby, based on the MIT license.
make awesome tables
= AwesomeTables
This rails gem is used to easily display, consistently styled tables. It is still very much a work in progress.
Installation is simple. gem install awesome_tables
rails g awesome_tables
= Example
In order to use an awesome_table, first you must register it in a helper. Two examples are below.
AwesomeTables.register :posts do |t| t.set_caption "Posts" t.column :published_at, :display_published_at t.column :post, :partial => 'awesome_tables/posts/body' t.column :comment_count, :comment_counter, :header_image => 'comment-grey-bubble.png' end
AwesomeTables.register :users do |t| t.set_caption "Users" t.column :full_name t.column :login t.column :email t.column :state end
Now you can use them in your views
<%= awesome_table :users, @users %> <%= awesome_table :posts, @posts %>
There are currently 4 different ways to declare a column.
The :header_image option will use the image as the column header instead header text. That code and the way it is used needs some attention. Things have changed a little bit since I put that in there.
You'll need to make sure that you create an awesome tables view folder. There is a base example table contained in lib/app/views/awesome_tables.
= TODO
Copyright (c) 2010 Dan Engle, released under the MIT license