effective_resources 2.9.3 → 2.9.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 +4 -4
- data/app/controllers/concerns/effective/crud_controller/save.rb +1 -1
- data/app/controllers/concerns/effective/wizard_controller/before_actions.rb +4 -2
- data/app/models/concerns/acts_as_wizard.rb +12 -11
- data/lib/effective_resources/version.rb +1 -1
- data/lib/effective_resources.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31ab38dae78be5079c1f7312694e48d20f944df03f634ec327f61f053b2ecd90
|
4
|
+
data.tar.gz: af0850da493f9408108da574756ffc49b31e2013453160f7b863edb65df35d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee7af38a7dd4128302fc3b480189837a6f51b5c5babc8308b1972b3501b28eaf82f4e94aea2803135037538edb34ba032bd2a81e9c18b103aa8536e6577b69bc
|
7
|
+
data.tar.gz: e2b4e7c3b1d23dc95b919627f9daae50ccaad2f2d87ae194601cb31b3c0e2054a23148b62ddf4e4d170f19bb6df06b1091ef0d5c00ef073c5f9f63e197a3387c
|
@@ -45,9 +45,11 @@ module Effective
|
|
45
45
|
return if step == 'wicked_finish'
|
46
46
|
return if resource.blank?
|
47
47
|
return if resource.try(:done?)
|
48
|
-
return unless resource_scope.respond_to?(:in_progress)
|
48
|
+
return unless resource_scope.respond_to?(:in_progress_for) || resource_scope.respond_to?(:in_progress)
|
49
|
+
|
50
|
+
in_progress = resource_scope.try(:in_progress_for, current_user) || resource_scope.try(:in_progress)
|
51
|
+
existing = in_progress.order(:id).where.not(id: resource).first
|
49
52
|
|
50
|
-
existing = resource_scope.in_progress.order(:id).where.not(id: resource).first
|
51
53
|
return unless existing.present?
|
52
54
|
return if resource.persisted? && (existing.id > resource.id) # Otherwise we get an infinite loop
|
53
55
|
|
@@ -21,6 +21,18 @@ module ActsAsWizard
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
module ClassMethods
|
25
|
+
def acts_as_wizard?; true; end
|
26
|
+
|
27
|
+
def wizard_steps_hash
|
28
|
+
const_get(:WIZARD_STEPS)
|
29
|
+
end
|
30
|
+
|
31
|
+
def all_wizard_steps
|
32
|
+
const_get(:WIZARD_STEPS).keys
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
included do
|
25
37
|
acts_as_wizard_options = @acts_as_wizard_options
|
26
38
|
|
@@ -180,17 +192,6 @@ module ActsAsWizard
|
|
180
192
|
|
181
193
|
end
|
182
194
|
|
183
|
-
module ClassMethods
|
184
|
-
def acts_as_wizard?; true; end
|
185
|
-
|
186
|
-
def wizard_steps_hash
|
187
|
-
const_get(:WIZARD_STEPS)
|
188
|
-
end
|
189
195
|
|
190
|
-
def all_wizard_steps
|
191
|
-
const_get(:WIZARD_STEPS).keys
|
192
|
-
end
|
193
|
-
|
194
|
-
end
|
195
196
|
|
196
197
|
end
|
data/lib/effective_resources.rb
CHANGED
@@ -145,7 +145,7 @@ module EffectiveResources
|
|
145
145
|
duplicate = ActiveStorage::Blob.create_before_direct_upload!(**atts)
|
146
146
|
|
147
147
|
case service.class.name
|
148
|
-
when 'ActiveStorage::Service::S3Service'
|
148
|
+
when 'ActiveStorage::Service::S3Service', 'ActiveStorage::Service::S3NoDeleteService'
|
149
149
|
bucket = service.bucket
|
150
150
|
object = bucket.object(blob.key)
|
151
151
|
object.copy_to(bucket.object(duplicate.key))
|
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.9.
|
4
|
+
version: 2.9.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: 2023-08-
|
11
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|