An open API service indexing awesome lists of open source software.

https://github.com/dbackowski/table_helpers

Rails table helpers
https://github.com/dbackowski/table_helpers

Last synced: about 1 year ago
JSON representation

Rails table helpers

Awesome Lists containing this project

README

          

# TableHelpers

Rails 3.x table helpers plugin.

## Examples

table_list:

```ruby
<%= table_list :class => 'list' do |t| %>
<%= t.headers ['First column', 'Second column'] %>
<%= t.tr do |tr| %>
<%= tr.td 'Example 1' %>
<%= tr.td 'Example 2', :class => 'options' %>
<% end %>
<% end %>
```

HTML output:

```html


First column
Second column


Example 1
Example 2

```

table_data:

```ruby
<%= table_data :label_size => 150 do |t| %>
<%= t.row 'Label name:', 'Data' %>
<%= t.section 'Next section:' %>
<%= t.row 'Label name 2:', 'Data 2' %>
<% end %>
```

HTML output:

```html


Label name:
Data


Next section:



Label name 2 :
Data 2:

```

Copyright (c) 2012 Damian Baćkowski, released under the MIT license