Skip to content

Commit 6e32255

Browse files
committed
DSL fix
1 parent db3c895 commit 6e32255

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/active_admin_import/dsl.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module DSL
2121
# +resource_class+:: resource class name, override to import to another table (default config.resource_class)
2222
# +resource_label+:: resource label value (default config.resource_label)
2323
# +plural_resource_label+:: pluralized resource label value (default config.plural_resource_label)
24-
# +headers_rewrites+:: hash with key (csv header) - value (db column name) rows mapping
24+
#
2525

2626
def active_admin_import(options = {}, &block)
2727
options.assert_valid_keys(*VALID_OPTIONS)
@@ -51,14 +51,9 @@ def active_admin_import(options = {}, &block)
5151
if authorized?(ActiveAdminImport::Auth::IMPORT, active_admin_config.resource_class)
5252
link_to(I18n.t('active_admin_import.import_model', model: options[:resource_label]), action: :import)
5353
end
54-
55-
@active_admin_import_model = options[:template_object]
56-
render template: options[:template]
5754
end
5855

59-
action_item :import, only: :index do
60-
link_to(I18n.t('active_admin_import.import_model', model: options[:resource_label]), action: :import)
61-
end
56+
6257

6358
collection_action :do_import, method: :post do
6459
authorize!(ActiveAdminImport::Auth::IMPORT, active_admin_config.resource_class)

0 commit comments

Comments
 (0)