effective_resources 1.8.5 → 1.8.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3054f246623c2920a43e74b98bdb52aa03501ca936da01036523ac76e6f35049
|
4
|
+
data.tar.gz: 2121fdfa7914e4b0c4c516a26d030f6ff3c1bda0d60ff54a5f683fe0c4280c51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c714c8640357cbb5c52aeca16a5cef0a6e0caf9eafe1a54cccf8c9aee79f27afb65ae022a8512c4297c379b96b9dc9c98275345709a24591aa8b1544051d64fc
|
7
|
+
data.tar.gz: be065c497d1b2b664b9d82dedf8fa2e3fd77bc25f89b06d51a1841ce9069fdd41e933d681cf11a66a2f76d2846c09b9f1c2353e75d88c69d48d8df0cbdacde27
|
@@ -148,6 +148,7 @@ module EffectiveResourcesHelper
|
|
148
148
|
effective_resource = (atts.delete(:effective_resource) || find_effective_resource)
|
149
149
|
|
150
150
|
action = atts.delete(:action)
|
151
|
+
safe = atts.delete(:safe)
|
151
152
|
atts = { :namespace => (effective_resource.namespace.to_sym if effective_resource.namespace), effective_resource.name.to_sym => resource }.compact.merge(atts)
|
152
153
|
|
153
154
|
if lookup_context.template_exists?("form_#{action}", controller._prefixes, :partial)
|
@@ -168,7 +169,10 @@ module EffectiveResourcesHelper
|
|
168
169
|
end
|
169
170
|
end
|
170
171
|
|
171
|
-
|
172
|
+
# Will raise the regular error
|
173
|
+
return ''.html_safe if safe
|
174
|
+
|
175
|
+
render('form', atts)
|
172
176
|
end
|
173
177
|
|
174
178
|
# Similar to render_resource_form
|
@@ -182,6 +186,7 @@ module EffectiveResourcesHelper
|
|
182
186
|
effective_resource = (atts.delete(:effective_resource) || find_effective_resource)
|
183
187
|
|
184
188
|
action = atts.delete(:action)
|
189
|
+
safe = atts.delete(:safe)
|
185
190
|
atts = { :namespace => (effective_resource.namespace.to_sym if effective_resource.namespace), effective_resource.name.to_sym => resource }.compact.merge(atts)
|
186
191
|
|
187
192
|
if lookup_context.template_exists?(effective_resource.name, controller._prefixes, :partial)
|
@@ -194,7 +199,10 @@ module EffectiveResourcesHelper
|
|
194
199
|
end
|
195
200
|
end
|
196
201
|
|
197
|
-
|
202
|
+
# Will raise the regular error
|
203
|
+
return ''.html_safe if safe
|
204
|
+
|
205
|
+
render(resource, atts)
|
198
206
|
end
|
199
207
|
alias_method :render_resource, :render_resource_partial
|
200
208
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% resource = (@_effective_resource || Effective::Resource.new(controller_path)) %>
|
2
2
|
<% @resource = instance_variable_get('@' + resource.name) if resource.name %>
|
3
3
|
|
4
|
-
EffectiveForm.remote_form_payload = "<%= j render_resource_form(@resource, action: action) %>";
|
4
|
+
EffectiveForm.remote_form_payload = "<%= j render_resource_form(@resource, action: action, safe: true) %>";
|
5
5
|
EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
|
6
6
|
EffectiveForm.remote_form_flash = <%= raw flash.to_json %>;
|
7
7
|
|
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.8.
|
4
|
+
version: 1.8.6
|
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: 2021-03-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|