importance 0.2.1 → 0.2.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06a3f745ccc2a6bde0266c86a4795f68231f4cf400c1507faec49c1c69901e77
|
4
|
+
data.tar.gz: 64408c2c3dde929bd12f5e7967e7a4f688a653fb0fe463b399d26cd3a0829cbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db2edded16d911bed719cb84e52f189090a820b0f934f27a1ca81500cf0772745cd5cdf0621cdb707a85964e6f922965c00fa404f69389427aacebd8ccc01b60
|
7
|
+
data.tar.gz: 5ad0e3f87df3aad0391292c370575cbe8dc08b7e4734832baa3400077a7f20b0660ffa8b0d2219dba0a1e6fe7f864c0540bbb185303fdfd9495d8023bf724e4e
|
data/README.md
CHANGED
@@ -130,6 +130,7 @@ the first row is automatically treated as the header row.
|
|
130
130
|
```erb
|
131
131
|
<%= form_with url: importance.submit_path(importer: :students), multipart: true do |form| %>
|
132
132
|
<%= form.file_field :file, accept: ".xlsx,.xls,.csv" %>
|
133
|
+
<%= form.hidden_field :redirect_url, value: root_path >
|
133
134
|
<%= form.submit "Submit" %>
|
134
135
|
<% end %>
|
135
136
|
```
|
@@ -26,6 +26,7 @@ module Importance
|
|
26
26
|
|
27
27
|
session[:path] = persist_path
|
28
28
|
session[:importer] = params[:importer].to_sym
|
29
|
+
session[:redirect_url] = params[:redirect_url]
|
29
30
|
|
30
31
|
redirect_to map_path
|
31
32
|
end
|
@@ -78,7 +79,7 @@ module Importance
|
|
78
79
|
if importer.teardown_callback
|
79
80
|
instance_exec(&importer.teardown_callback)
|
80
81
|
else
|
81
|
-
redirect_to session[:redirect_url] || root_path, notice: "Import completed."
|
82
|
+
redirect_to (session[:redirect_url] || main_app.root_path), notice: "Import completed."
|
82
83
|
end
|
83
84
|
|
84
85
|
rescue => e
|
@@ -36,10 +36,10 @@
|
|
36
36
|
<% end %>
|
37
37
|
</tbody>
|
38
38
|
</table>
|
39
|
-
<p>
|
40
|
-
<%= t('importance.import_description', count: @samples.count, full_count: @full_count) %>
|
41
|
-
</p>
|
42
39
|
</div>
|
40
|
+
<p>
|
41
|
+
<%= t('importance.import_description', count: @samples.count, full_count: @full_count) %>
|
42
|
+
</p>
|
43
43
|
<% end %>
|
44
44
|
|
45
45
|
<script>
|
data/lib/importance/version.rb
CHANGED