The Table component introduces:
- <%= code("app/helpers/components/table_helper.rb") %>
The table component is so far unique in that it is entirely provided by <%= code("app/helpers/components/table_helper.rb") %>. This helper introduces methods that rely on <%= code("content_tag") %> to create the markup for the table. To edit anything about the rendered table, look there.
<%= code("app/helpers/components/table_helper.rb") %> introduces the following methods that can be used to create a table.
- <%= code("render_table") %> accepts an optional caption as the first argument along with the block for the rest of the table components.
- <%= code("table_head") %> accepts a block for the content of the <%= code("thead") %> row.
- <%= code("table_header") %> accepts the header content inline or in a block. This will be rendered within the <%= code("thead") %> for that column.
- <%= code("table_body") %> accepts a block for the content of the <%= code("tbody") %>.
- <%= code("table_row") %> accepts a block for the content of the <%= code("tr") %>.
- <%= code("table_column") %> accepts the column content inline or in a block. This will be rendered within the <%= code("td") %> for the column.