27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/active_admin_import/options.rb', line 27
def self.options_for(config, options = {})
unless options.key? :template_object
options[:template_object] = -> { ActiveAdminImport::Model.new }
end
{
back: { action: :import },
csv_options: {},
template: 'admin/import',
resource_class: config.resource_class,
resource_label: config.resource_label,
plural_resource_label: config.plural_resource_label,
error_limit: 5,
headers_rewrites: {},
if: true
}.deep_merge(options)
end
|