active_admin_import_anything 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  class FileDb
2
2
  class << self
3
- def do_import(target_model, file, &block)
3
+ def do_import(file, &block)
4
4
  if (block_given?)
5
- block.call(target_model, file)
5
+ block.call(file)
6
6
  end
7
7
  end
8
8
  end
@@ -9,8 +9,8 @@ module ActiveAdminImportAnything
9
9
  render "admin/file/upload_file"
10
10
  end
11
11
 
12
- collection_action :upload_file, :method => :post do
13
- FileDb.do_import(active_admin_config.resource_class, params[:dump][:file], &block)
12
+ collection_action :import_file, :method => :post do
13
+ FileDb.do_import(params[:dump][:file], &block)
14
14
  redirect_to :action => :index, :notice => "#{active_admin_config.resource_name.to_s} imported successfully!"
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminImportAnything
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_import_anything
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: