Sha256: 046641920a94c508fb57e84d40e3cfb1b7dca012e327510ed70196d2c2e893dc

Contents?: true

Size: 615 Bytes

Versions: 3

Compression:

Stored size: 615 Bytes

Contents

# Customizing the CSV format

Active Admin provides CSV file downloads on the index screen for each Resource.
By default it will render a CSV file with all the content columns of your
registered model.

Customizing the CSV format is as simple as customizing the index page.

    ActiveAdmin.register Post do
      csv do
        column :title
        column("Author") { |post| post.author.full_name }
      end
    end

You can choose custom separator

    ActiveAdmin.register Post do
      csv :separator => ';' do
        column :title
        column("Author") { |post| post.author.full_name }
      end
    end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activeadmin-0.5.0 docs/4-csv-format.md
activeadmin-0.5.0.pre1 docs/4-csv-format.md
activeadmin-0.5.0.pre docs/4-csv-format.md