Module: TableToCsvHelper

Defined in:
app/helpers/table_to_csv_helper.rb

Instance Method Summary collapse

Instance Method Details

#table_export_tag(id = "", options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/helpers/table_to_csv_helper.rb', line 4

def table_export_tag(id = "", options = {})
  html_options = {
    id: "export_table_to_csv",
    type: "button",
    data: {
      export: "export",
      id: id
    },
    style: export_button_style(options)
  }
  html_options[:class] = options[:class] if options[:class]

  (
    :button,
    options[:export_link_text] || "Export",
    html_options
  )
end