Sha256: e7e4c5ea64e4a4a8b593c4305a3f5ee08518a9c3e42c8fe45c2b36bcf286ce4e
Contents?: true
Size: 726 Bytes
Versions: 47
Compression:
Stored size: 726 Bytes
Contents
<%- csv_lib = if RUBY_VERSION =~ /^1.8/ require 'fastercsv' FasterCSV else require 'csv' CSV end col_sep = active_admin_config.csv_builder.column_separator || active_admin_application.csv_column_separator options = (active_admin_config.csv_builder.options || active_admin_application.csv_options).merge(:col_sep => col_sep) csv_output = csv_lib.generate(options) do |csv| columns = active_admin_config.csv_builder.columns csv << columns.map(&:name) collection.each do |resource| csv << columns.map do |column| call_method_or_proc_on resource, column.data end end end %> <%= csv_output.html_safe %>
Version data entries
47 entries across 47 versions & 2 rubygems