Method: Nitro::TableHelper#table
- Defined in:
- lib/nitro/helper/table.rb
#table(options) ⇒ Object Also known as: build_table
options-
A hash of options.
:id = id of the component. :class = class of the component :headers = an array of the header values :values = an array of arrays. :order = options hash (:left, :right, :asc_pic, :desc_pic, :values) :alternating_rows = alternating rows, use css to color row_even / row_odd :footers = an array of tfooter values
64 65 66 67 68 69 70 71 72 73 |
# File 'lib/nitro/helper/table.rb', line 64 def table() str = '<table' str << %| id="#{[:id]}"| if [:id] str << %| class="#{[:class]}"| if [:class] str << '>' str << table_rows() str << '</table>' end |