effective_resources 2.25.11 → 2.25.13

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: e7440ef830150c8ec4c369c08cb58cc5bb3415caab9db4faea965c3cb7e11e0c
4
- data.tar.gz: bf4772a488fd33850bcc4c516ff9b46091a257d1ebbe2549a84dfc09b15f011f
3
+ metadata.gz: 93a5d8f22066c2ef44ed8eba67c91a57dd7d7ce8bfdf70e319ff3e0b1772e0f6
4
+ data.tar.gz: 668639a5b59a80c5357c6d9a8f4d75f2fc21d40b378f15414be05bb0fdf83820
5
5
  SHA512:
6
- metadata.gz: fee2257076e00d82dbf4a09a012a8a6a8030555bcaf99686830870a75789ecea932c2d935191936c074515c0b94c0008c8a06e351559cf7696b7c04bc3bf8778
7
- data.tar.gz: fb387e13667ba8ca83f0a6101e3fed16dbf2f484f03391edebec5c4786d38f1f3f73b071d72598292ed3c3e16313749606314e59155290832db74d44c604a0e9
6
+ metadata.gz: be0c86a147fc2d73d803c6c275eec3d97f9b15e8428477a12c9874b1b47d40c6d97eb1a6502e4c00c584d755495c0f53c3d15e901f622077be2f87d18cd69521
7
+ data.tar.gz: 772e6d5ff8c6ff7e522a0fa0d9f62765323733a1c7bb43af43c9e652781005ca8003e76fa7982f92ba96051fd28956aed13578901056c5d726ba504db8360ce3
@@ -56,7 +56,7 @@ module Effective
56
56
 
57
57
  messages << e.message if messages.blank? && e && e.respond_to?(:message)
58
58
 
59
- messages.to_sentence.presence
59
+ messages.uniq.to_sentence.presence
60
60
  end
61
61
 
62
62
  def action_verb(action)
@@ -278,7 +278,7 @@ module EffectiveResourcesHelper
278
278
  raise("expected a title for step #{step}") unless title.present?
279
279
 
280
280
  link = if edit_effective_wizard? && resource.is_a?(controller.resource_klass) && resource.can_visit_step?(step)
281
- link_to('Edit', wizard_path(step), title: "Edit #{title}", class: 'btn btn-secondary')
281
+ link_to('Edit', wizard_path(step), title: "Edit #{title}", class: 'btn btn-secondary mb-2')
282
282
  end
283
283
 
284
284
  content_tag(:div, class: 'card mb-4') do
@@ -157,6 +157,18 @@ module ActsAsWizard
157
157
  all_steps.first(index)
158
158
  end
159
159
 
160
+ def all_steps_after(step)
161
+ index = all_steps.index(step)
162
+ raise("unexpected step #{step}") unless index.present?
163
+
164
+ all_steps[(index + 1)..-1]
165
+ end
166
+
167
+ def reset_all_wizard_steps_after(step)
168
+ all_steps_after(step).each { |step| wizard_steps.delete(step) }
169
+ wizard_steps
170
+ end
171
+
160
172
  def previous_step(step)
161
173
  index = required_steps.index(step)
162
174
  required_steps[index-1] unless index == 0 || index.nil?
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.25.11'.freeze
2
+ VERSION = '2.25.13'.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: 2.25.11
4
+ version: 2.25.13
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: 2024-08-01 00:00:00.000000000 Z
11
+ date: 2024-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails