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: 8932ca3f775616358be95d4bb6164a807dfcb19b88e9edc850ce76e8591ea0c5
4
- data.tar.gz: 995531acbf763a74ddcf7ca870f5889e489ca1812d3144dec83673b65e73f8f7
3
+ metadata.gz: 06a3f745ccc2a6bde0266c86a4795f68231f4cf400c1507faec49c1c69901e77
4
+ data.tar.gz: 64408c2c3dde929bd12f5e7967e7a4f688a653fb0fe463b399d26cd3a0829cbc
5
5
  SHA512:
6
- metadata.gz: 324d49edebde11322489529b0edc6fc492ae227ca6ded396e118bb6b4f0f3a04f6e907d1e8277c3c87d046555e1d5fa54e44ad3db9151db7ea99cabf9736d7fc
7
- data.tar.gz: ffdda200cfb6d85b6dec0741a173ba57a794b75e5a24d642c3451526a9a96a33452b36df6ce12e0b47ca3f7771eac61bf7433dc9561d18411a09c0aabc0bcfa6
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>
@@ -1,3 +1,3 @@
1
1
  module Importance
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: importance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker