unpoly-rails 3.7.2 → 3.7.3.1
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/assets/unpoly/unpoly.es6.js +11 -7
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +11 -7
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change/field.rb +9 -3
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +2 -2
@@ -103,11 +103,17 @@ module Unpoly
|
|
103
103
|
def parse(raw)
|
104
104
|
result = Util.guard_json_decode(raw, &@default)
|
105
105
|
|
106
|
-
|
107
|
-
|
106
|
+
# A client might have sent valid JSON but not a JSON object.
|
107
|
+
# E.g. an array, number or string.
|
108
|
+
unless result.is_a?(::Hash)
|
109
|
+
if raw.present?
|
110
|
+
::Rails.logger.error('unpoly-rails: Unexpected JSON value in X-Up header')
|
111
|
+
end
|
112
|
+
|
113
|
+
result = {}
|
108
114
|
end
|
109
115
|
|
110
|
-
result
|
116
|
+
ActiveSupport::HashWithIndifferentAccess.new(result)
|
111
117
|
end
|
112
118
|
|
113
119
|
def stringify(value)
|
data/lib/unpoly/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unpoly-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|