Module: ActionTable::Helper
- Defined in:
- lib/action_table/helper.rb
Instance Method Summary collapse
-
#action_table(records, fields, paginate: false, link: ActionTable.config.link_method, 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, link: ActionTable.config.link_method, 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, link: ActionTable.config.link_method, actions: ActionTable.config.actions, styles: ActionTable.config.styles ) action_table = View.new( cols: fields, records: records, paginate: paginate, link: link, actions: actions, styles: styles, ) render('action_table/table', table: action_table) end |