module RailsTableFor::TableHelper
Public Instance Methods
table_for(records, **options) { |table| ... }
click to toggle source
# File lib/rails_table_for/table_helper.rb, line 9 def table_for(records, **options) options.merge!(request_options) table = Elements::Table.new(records, options) yield table if block_given? table.to_s end
Private Instance Methods
request_options()
click to toggle source
# File lib/rails_table_for/table_helper.rb, line 18 def request_options { request_path: request.path, request_params: request.params.except(:action, :controller) } end