effective_resources 1.8.16 → 1.8.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a854fdf544ea77faf7d45b251f8161b54ef66685c71730d6b4bdef42298ac371
4
- data.tar.gz: 22d0141d18a049ed853d2ba54197758e46817ffdf6704c1facee7850cad5bef6
3
+ metadata.gz: 0162db8b9e57f6f0289551a07214bbba02f4154d8786fa38a92e51c023317f17
4
+ data.tar.gz: b993410fb958c5efa5a8d281a8def12f8b1e02c209e56ba9835d283a0e33ef44
5
5
  SHA512:
6
- metadata.gz: fa64174fb405b2499a303ed87d64b8e32aa4d7c48388875c811919526935679a4c98bfef973e0f41b2124257b5d9d46207e906f85776d5eb5c0bf487ee086179
7
- data.tar.gz: e00c2e31e5430de0a3e19d2f0d607fa73426edbbe8f7d31c0936f60a418a4bf92206fef2d904d2ba78dab1bfffc132235056ad138ede924642cabdeffd8a6408
6
+ metadata.gz: a8d89ebcead9ac5fee2263e5dc6fe83703a103f7daa6e3501a53fdc169b14a0adc65176a46b8fa7ac3310e348afce0b805fe007d14c48a07d38811bdad2f7f6c
7
+ data.tar.gz: 8f59af5c2225dce3a7378317688f53a4ce79b6db2502f10cd0632b605e9ad5c02c21eba28ec45d8b428c1e1e9ba229d976c4bc1b9a944cfdbf27771f988cde95
@@ -15,7 +15,16 @@ module Effective
15
15
 
16
16
  format.js do
17
17
  flash[:success] ||= resource_flash(:success, resource, action)
18
- render(action, locals: { remote_form_redirect: resource_redirect_path(resource, action)}) # action.js.erb
18
+
19
+ if params[:_datatable_action]
20
+ redirect_to(resource_redirect_path(resource, action))
21
+ else
22
+ render(
23
+ (template_present?(action) ? action : :member_action),
24
+ locals: { action: action, remote_form_redirect: resource_redirect_path(resource, action)}
25
+ )
26
+ end
27
+
19
28
  end
20
29
  end
21
30
  elsif template_present?(action)
@@ -9,7 +9,7 @@ module Effective
9
9
  if save_resource(resource, action)
10
10
  flash[:success] ||= options.delete(:success) || resource_flash(:success, resource, action)
11
11
 
12
- @skip_to ||= next_step
12
+ @skip_to ||= resource.required_steps.find { |s| s == next_step } || resource.first_uncompleted_step
13
13
  @redirect_to ||= resource_wizard_path(resource, @skip_to) if was_new_record
14
14
 
15
15
  redirect_to(@redirect_to || wizard_path(@skip_to))
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '1.8.16'.freeze
2
+ VERSION = '1.8.17'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.16
4
+ version: 1.8.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-21 00:00:00.000000000 Z
11
+ date: 2021-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails