Module: ActionTable::Helper
- Defined in:
- lib/action_table/helper.rb
Instance Method Summary collapse
-
#action_table(records, fields, paginate: false, links: ActionTable.config.links, actions: ActionTable.config.actions, styles: ActionTable.config.styles) ⇒ String
Renders an ActiveRecord collection as a HTML table.
Instance Method Details
#action_table(records, fields, paginate: false, links: ActionTable.config.links, actions: ActionTable.config.actions, styles: ActionTable.config.styles) ⇒ String
Renders an ActiveRecord collection as a HTML table.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/action_table/helper.rb', line 22 def action_table( records, fields, paginate: false, links: ActionTable.config.links, actions: ActionTable.config.actions, styles: ActionTable.config.styles ) action_table = View.new( columns: fields, records: records, paginate: paginate, links: links, actions: actions, ) styles = BootstrapStyles.new(styles) render('action_table/table', table: action_table, styles: styles) end |