active_admin_import_anything 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -18,25 +18,18 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- Add the following line into your active admin resource:
22
-
23
-
24
- active_admin_import_anything
25
-
26
- The Import button should now appear. Click it and upload your file. Press submit.
27
-
28
- ## Custom Import Behavior
29
-
30
- Need to do something special with the import? active_admin_importable accepts an optional block that will be called on each row, replacing the default functionality ( calling create! on the associated model). The associated model and a hash of the current row will get passed into the block. For example:
21
+ Add the following block into your active admin resource:
31
22
 
32
23
  ```
33
24
  ActiveAdmin.register Product do
25
+
34
26
  active_admin_import_anything do |file|
35
27
  #write the code to handle the imported file
36
28
  end
37
29
  end
38
30
  ```
39
31
 
32
+ The Import button should now appear. Click it and upload your file. Press submit.
40
33
 
41
34
  ## Contributing
42
35
 
@@ -6,7 +6,7 @@ module ActiveAdminImportAnything
6
6
  end
7
7
 
8
8
  collection_action :upload_file do
9
- render "admin/csv/upload_file"
9
+ render "admin/file/upload_file"
10
10
  end
11
11
 
12
12
  collection_action :upload_file, :method => :post do
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminImportAnything
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
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.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: