lib/action_table/helper.rb in action_table-0.2.0 vs lib/action_table/helper.rb in action_table-0.3.0

- old
+ new

@@ -11,28 +11,28 @@ # records ActiveRecord collection to render # @param [Array<String>, Array<Symbol>] # table columns (must map to methods on each ActiveRecord instance) # @param styles [Array<String>, Array<Symbol>] # no, one or many of bootstrap table styles (table- prefix will be added) - # @param link [Symbol] - # method name for the default name to use for anchor-tags + # @param link [String, Symbol, Array<String>, Array<Symbol>] + # field(s) that will link to the resource # @param paginate [true, false] # whether to render pagination links (default: false) # @param actions [Array<String>, Array<Symbol>] # render action lins (show, edit and delete) def action_table( records, fields, paginate: false, - link: ActionTable.config.link_method, + links: ActionTable.config.links, actions: ActionTable.config.actions, styles: ActionTable.config.styles ) action_table = View.new( - cols: fields, + columns: fields, records: records, paginate: paginate, - link: link, + links: links, actions: actions, styles: styles, ) render('action_table/table', table: action_table)