Module: EasyTable::ViewExt::Table
- Defined in:
- lib/easy-table/table/base.rb,
lib/easy-table/table/data_table.rb,
lib/easy-table/table.rb
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#table(collection, headers, options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/easy-table/table.rb', line 7 def table(collection, headers, = {}, &block) obj_type = get_obj_type collection return [:placeholder] unless collection.any? .delete :placeholder = .delete :caption = .delete :footer render_table do [ (), render_header(headers), (, headers), render_tbody(collection, &block) ].compact.join.html_safe end end |