Method: ActiveAdmin::CSVBuilder#encode

Defined in:
lib/active_admin/csv_builder.rb

#encode(content, options) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/active_admin/csv_builder.rb', line 82

def encode(content, options)
  if options[:encoding]
    if options[:encoding_options]
      content.to_s.encode options[:encoding], **options[:encoding_options]
    else
      content.to_s.encode options[:encoding]
    end
  else
    content
  end
end