effective_resources 2.7.9 → 2.7.10
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: 48aa19d02843bf4a42426c3de84b791ec707d0784b1d3275f75348fd3795fb17
|
|
4
|
+
data.tar.gz: 8f31b8917443d4543992e41bbdf5c894591f02ae2b339d46d20994e97da5e1db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f32a15406d2171eb4ec61801a8d124e17041d60be2004ca20c53dfb852ef15e2fec4cfd036cf1ddeafbdbaa1944c8dc5838fff95b1823be5594a2726b1fc7632
|
|
7
|
+
data.tar.gz: a582b22c7d231788aeb012d6a38fd0606af01f0b14bbc6ed1efaf285d7c1407cab8f71e31c6a1e1d1a0f2fa9da8e19e192e5f80f17c92b388a94e8807792f25d
|
|
@@ -206,7 +206,7 @@ module EffectiveResourcesHelper
|
|
|
206
206
|
end
|
|
207
207
|
alias_method :render_resource, :render_resource_partial
|
|
208
208
|
|
|
209
|
-
def
|
|
209
|
+
def render_partial_exists?(partial, atts = {})
|
|
210
210
|
raise('expected a path') unless partial.kind_of?(String)
|
|
211
211
|
raise('path should not include spaces') if partial.include?(' ')
|
|
212
212
|
|
|
@@ -215,12 +215,11 @@ module EffectiveResourcesHelper
|
|
|
215
215
|
file = pieces.last
|
|
216
216
|
path = pieces[0..-2].join('/')
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
end
|
|
218
|
+
lookup_context.exists?(file, [path], :partial)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
def render_if_exists(partial, atts = {})
|
|
222
|
+
render(partial, atts) if render_partial_exists?(partial, atts)
|
|
224
223
|
end
|
|
225
224
|
|
|
226
225
|
# Tableize attributes
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
= wizard_card(resource) do
|
|
2
|
-
=
|
|
3
|
-
|
|
2
|
+
- partial = "#{resource.render_path}/#{resource.render_step}_fields"
|
|
3
|
+
|
|
4
|
+
- if render_partial_exists?(partial)
|
|
5
|
+
= effective_table_with(resource) { |f| render(partial, f: f) }
|
|
6
|
+
|
|
7
|
+
- elsif Rails.env.development? || Rails.env.test?
|
|
8
|
+
- names = partial.split('/')
|
|
9
|
+
- name = names[0...-1].join('/') + '/_' + names.last + '.html.haml'
|
|
10
|
+
|
|
11
|
+
%div.alert.alert-warning Unable to find partial: #{name}
|
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.10
|
|
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-05-
|
|
11
|
+
date: 2023-05-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|