roda-component 0.1.58 → 0.1.59
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/lib/roda/component/version.rb +1 -1
- data/lib/roda/plugins/component.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be3d72ffbca819c4a72897b8b253786611c03e26
|
|
4
|
+
data.tar.gz: ddae896932ab4212f4efad80e01b8f2af9ce909e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a4902134175f8354faf880cf946e52eeda7b9f9c80b616a7a9672da39a19db2e5cdb89c5b54250b8476957a78d2dcdd46510dc588d3bab04f90ba3a6b2a9feb
|
|
7
|
+
data.tar.gz: 2cd5e37e0903671d7837fa54313caf8a845b92a352bb7938ccf74f1015a47d88391b18fa82a143714b230dec8b839a196dff737df718c40dc2e510d70e8d1063
|
|
@@ -175,6 +175,8 @@ class Roda
|
|
|
175
175
|
end
|
|
176
176
|
|
|
177
177
|
if trigger || action
|
|
178
|
+
comp_response = '' if js && !comp_response
|
|
179
|
+
|
|
178
180
|
load_component_js comp, action, options
|
|
179
181
|
|
|
180
182
|
if js && comp_response.is_a?(Roda::Component::DOM)
|
|
@@ -269,7 +271,14 @@ class Roda
|
|
|
269
271
|
|
|
270
272
|
on self.class.component_route_regex do |comp, type, action|
|
|
271
273
|
body = scope.request.body.read
|
|
272
|
-
|
|
274
|
+
|
|
275
|
+
begin
|
|
276
|
+
data = body ? JSON.parse(body) : {}
|
|
277
|
+
rescue
|
|
278
|
+
data = {}
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
data.merge! scope.request.params unless data.is_a? Array
|
|
273
282
|
|
|
274
283
|
if data.is_a? Array
|
|
275
284
|
data = {args: data}
|