Sha256: 22094abbcf9541b7f9fc77dfd0b6650a454dd7dfdeec32673e451b8f70b274df

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

<h2>Basic Table</h2>
<p>To output your report as a table you must define a method named <strong>rows</strong> and at least 1 <strong>column</strong> within you report class. This method should return an array (or other enumerable object) with each item representing a row in the table.</p>
<p>The filtering form and the table below are output using the following 2 helpers.</p>
<blockquote><%%= filters_for(@report) %><br />
<%%= table_for(@report, class_name: 'table') %>
</blockquote>
<p>The class_name option sets the class of the generated table, here we are setting it to "table" so Bootstrap will add some basic styling</p>
<h3>Example</h3>
<div class="filters">
  <%= filters_for(@report) %>
</div>
<%= table_for(@report, class_name: 'table') %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reporta-modules-0.0.3 spec/dummy/app/views/reports/table.html.erb
reporta-modules-0.0.2 spec/dummy/app/views/reports/table.html.erb
reporta-modules-0.0.1 spec/dummy/app/views/reports/table.html.erb