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

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.136 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.135 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.134 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.133 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.132 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.131 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.129 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.128 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.126 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.125 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.124 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.123 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.118 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.116 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.114 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.113 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.111 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.109 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb
lalala-4.0.0.dev.107 vendor/deps/active_admin/app/views/active_admin/resource/index.csv.erb