effective_resources 2.7.8 → 2.7.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31e09d4567b7c51be34c376f25ef74abd17969a9fd193dae5cddca70b9513455
|
4
|
+
data.tar.gz: b518f302ee57740c70ff98033ecd71890032b85f675731c9ee860d9f57fec222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1721954e1ed150209853308b56f3e0f29b2f4a98bf4f9327bf17ec005cc65a9033debde9c78db025947c86bbaeb5f89941b63c63089dfd281ff3893d01a3c4bc
|
7
|
+
data.tar.gz: 7134665aee289d98d4e158c63f40ac67e006b14920b26de1f43e150f956ab300c232a7b91da6b77a72ba08c5ff1e5862f7e35c190900ffa0c1971bfd3620addc
|
@@ -42,4 +42,20 @@ module EffectiveResourcesWizardHelper
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
def render_wizard_resource(resource, as: nil, path: nil)
|
46
|
+
effective_resource = Effective::Resource.new(resource)
|
47
|
+
|
48
|
+
as ||= effective_resource.name
|
49
|
+
path ||= effective_resource.view_file_path(nil)
|
50
|
+
raise('expected a path') unless path.present?
|
51
|
+
|
52
|
+
resource.render_path = path.to_s.chomp('/')
|
53
|
+
|
54
|
+
resource.render_steps.map do |partial|
|
55
|
+
resource.render_step = partial
|
56
|
+
|
57
|
+
render_if_exists("#{path}/#{partial}", as.to_sym => resource) || render('effective/acts_as_wizard/wizard_step', resource: resource, resource_path: path)
|
58
|
+
end.join.html_safe
|
59
|
+
end
|
60
|
+
|
45
61
|
end
|
@@ -31,6 +31,7 @@ module ActsAsWizard
|
|
31
31
|
|
32
32
|
# Used by the view when rendering each partial. Not the current step.
|
33
33
|
attr_accessor :render_step
|
34
|
+
attr_accessor :render_path
|
34
35
|
|
35
36
|
if Rails.env.test? # So our tests can override the required_steps method
|
36
37
|
cattr_accessor :test_required_steps
|
@@ -92,7 +93,7 @@ module ActsAsWizard
|
|
92
93
|
|
93
94
|
# For use in the summary partials. Does not include summary.
|
94
95
|
def render_steps
|
95
|
-
blacklist = [:start, :billing, :checkout, :submitted, :summary]
|
96
|
+
blacklist = [:start, :billing, :checkout, :submit, :submitted, :summary]
|
96
97
|
((required_steps | completed_steps) - blacklist).select { |step| has_completed_step?(step) }
|
97
98
|
end
|
98
99
|
|
data/lib/effective_resources.rb
CHANGED
@@ -153,7 +153,7 @@ module EffectiveResources
|
|
153
153
|
path = service.path_for(blob.key)
|
154
154
|
duplicate_path = service.path_for(duplicate.key)
|
155
155
|
FileUtils.mkdir_p(File.dirname(duplicate_path))
|
156
|
-
FileUtils.ln(path, duplicate_path) if File.
|
156
|
+
FileUtils.ln(path, duplicate_path) if File.exist?(path)
|
157
157
|
else
|
158
158
|
raise "unknown storage service #{service.class.name}"
|
159
159
|
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.7.
|
4
|
+
version: 2.7.9
|
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-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -207,6 +207,7 @@ files:
|
|
207
207
|
- app/views/application/show.js.erb
|
208
208
|
- app/views/application/update.js.erb
|
209
209
|
- app/views/effective/acts_as_email_form/_fields.html.haml
|
210
|
+
- app/views/effective/acts_as_wizard/_wizard_step.html.haml
|
210
211
|
- app/views/effective/resource/_actions.html.haml
|
211
212
|
- app/views/effective/resource/_actions_dropleft.html.haml
|
212
213
|
- app/views/effective/resource/_actions_glyphicons.html.haml
|