-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Active Admin developer can pass options for CSV generation #1626
Active Admin developer can pass options for CSV generation #1626
Conversation
Hmm, we should maybe revert the recently merged #1608 and otherwise use the solution in this current request, as it is more flexible. Can you do that in this pull request? |
I can update the docs now. I should not merge in the separator key with the other options, right? Sorry, I was away helping family all weekend! |
I think it makes sense to merge the separator key. |
@pcreux can I get consensus on this before I change it? |
I agree with @pcreux that both behaviors should be kept. I think there is consensus. |
@@ -7,7 +7,10 @@ | |||
CSV | |||
end | |||
|
|||
csv_output = csv_lib.generate(:col_sep => active_admin_config.csv_builder.column_separator || active_admin_application.csv_column_separator) do |csv| | |||
col_sep = active_admin_config.csv_builder.column_separator || active_admin_application.csv_column_separator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a deprecation warning here when col_sep is set. It will be removed in ActiveAdmin 0.6.0.
Yup, will do tomorrow. I'm planning on working on issue #1694 as well. :) |
The deprecation warning is all over the specs, should I try to get rid of this? I noticed there were a few others as well. |
Hey @rheaton Could you rebase your changes against master so that I can merge this in? :) |
For example, in active admin config: `config.csv_options = { :force_quotes => true }` or in the active admin resource definition: `csv :options => { :force_quotes => true} do . . .`
…eparator and custom options for CSV builder
Done! |
Active Admin developer can pass options for CSV generation
🤘 |
For example, in active admin config:
config.csv_options = { :force_quotes => true }
or in the active admin resource definition:
csv :options => { :force_quotes => true} do . . .