Adds a docket
helper to a Rails project for rendering an AR model or iterable collection of models as an HTML table.
From your Rails view call docket
with the following:
model
: An AR model instance or collection of models to render in a table.ignore
(optional): An array of symbols which map to model attributes which won't be rendered in the table.calls
(optional): An array of strings which map to methods to call against the instance.table_class
(optional): Class attribute to use for the table.table_id
(optional): ID attribute to use for the table.table_style
(optional): Style attribute to use for the table.
<%= docket @users,
ignore: [:updated_at, :created at],
calls: [['fullname'], ['is_admin.humanize', 'Is Admin?']],
table_class: 'tablesorter',
table_id: 'user',
table_style: 'background-color: white'
%>
MIT-LICENSE.