app/views/active_admin/resource/index.csv.erb in activeadmin-0.6.0 vs app/views/active_admin/resource/index.csv.erb in activeadmin-0.6.1
- old
+ new
@@ -5,14 +5,14 @@
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)
+ default = active_admin_application.csv_options
+ options = default.merge active_admin_config.csv_builder.options
+ columns = active_admin_config.csv_builder.columns
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