effective_resources 1.6.4 → 1.6.5

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: 4bb7652d9f80993d8147a2256189201111268282d81f881172df757474113e39
4
- data.tar.gz: 101536d12175828d0ae1008e2d6dbf226e3f594a93c55f7566f89a17d3bcd1c8
3
+ metadata.gz: 638c0fd7b0f6e8ad8cbcdfe19a1d10e3824a2767734371e7ee744687181eb773
4
+ data.tar.gz: 25bf07d2126c62e65092cbeb4113a8df0017188fd5f17108b425cf8aa4ff09b0
5
5
  SHA512:
6
- metadata.gz: 360ae9e38369c840302b06696686e3e3f64ed4375fdc651571f29208c437281248c02ab8aed272063e3f3e0fd6ab999e891bbe368e60f93ff05cbc27521abffa
7
- data.tar.gz: 5cfa3f62f33ec8f0d2b1c2ea11806634964af86f9b19c2088ea184c1cf528bcabf3d7c4c0c873125ab90d60eb8a794ca376c91d78a05cd57f43137d6f827567f
6
+ metadata.gz: 86e11947ca25724dfb6255bd77129b92b87780f8199257634ebdd6841406165ba952d4ddad329608d15685102c5e216b9afeae6cffc51052c05b9564881ec749
7
+ data.tar.gz: 70608699672fe60a576f96987224accdddeffeef6248d775c2f6f4481ef1b69c42edddc14e20cb953025098e041d9e354fdb354dfa0a6b99a25a18218f9a5d81
@@ -42,9 +42,14 @@ module Effective
42
42
  return if resource.can_visit_step?(step)
43
43
 
44
44
  next_step = wizard_steps.reverse.find { |step| resource.can_visit_step?(step) }
45
- raise('There is no wizard step to visit') unless next_step
45
+ raise('There is no wizard step to visit. Make sure can_visit_step?(step) returns true for at least one step') unless next_step
46
46
 
47
- flash[:danger] = "You have been redirected to the #{resource_wizard_step_title(next_step)} step."
47
+ if Rails.env.development?
48
+ Rails.logger.info " \e[31m\e[1mFAILED\e[0m\e[22m" # bold red
49
+ Rails.logger.info " Unable to visit step :#{step}. Last can_visit_step? is :#{next_step}. Change the acts_as_wizard model's can_visit_step?(step) function to change this."
50
+ end
51
+
52
+ flash[:success] = "You have been redirected to the #{resource_wizard_step_title(next_step)} step."
48
53
  redirect_to wizard_path(next_step)
49
54
  end
50
55
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '1.6.4'.freeze
2
+ VERSION = '1.6.5'.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.6.4
4
+ version: 1.6.5
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: 2020-12-08 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails