Skip to content

[#911] Add support for separator in CSVBuilder#1201

Merged
pcreux merged 4 commits intoactiveadmin:masterfrom
LTe:911-add-separator-option-to-csv-builder
May 10, 2012
Merged

[#911] Add support for separator in CSVBuilder#1201
pcreux merged 4 commits intoactiveadmin:masterfrom
LTe:911-add-separator-option-to-csv-builder

Conversation

@LTe
Copy link
Copy Markdown
Contributor

@LTe LTe commented Apr 4, 2012

ActiveAdmin.register Post do
  csv do
    column :title
    column :body
    separator ";"
  end

@latortuga
Copy link
Copy Markdown
Contributor

I like this idea! What do you think about something this as syntax instead:

ActiveAdmin.register Post do
  csv :separator => ';' do
    column :title
    column :body
  end
end

The reason I suggest this way is because it is more consistent with the way that AA typically allows declarations as part of the enclosing block. Think of things like the title of the show page, or an alternative name for your model at the beginning of the register block.

@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Apr 5, 2012

I agree - code updated ;)

@simi
Copy link
Copy Markdown
Contributor

simi commented Apr 11, 2012

This is really nice. Good work!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this step default to the "," separator and update the scenarios accordingly?

@ghost ghost assigned pcreux May 9, 2012
@travisbot
Copy link
Copy Markdown

This pull request passes (merged fc52f0f into 302501c).

pcreux added a commit that referenced this pull request May 10, 2012
…lder

[#911] Add support for separator in CSVBuilder
@pcreux pcreux merged commit c996a84 into activeadmin:master May 10, 2012
@LTe LTe unassigned pcreux Aug 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants