iknow_view_models 2.8.9 → 2.8.10
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: 51b9c3c09028c03ae788841cce54fd75bee5c01fa2052a50404c3ae4d65fd1e5
|
4
|
+
data.tar.gz: 46bbee4b8f0c18c29d204af1dd1bf2ab318b7b15ea3df062c861bf13eb7317a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d24ad04de38a97931d0f04b7b6ed98756bd8b7c6cb33624bd165b350c138c12f5b6c8ed95ae0e8e1a980295994238056961469f807e40be1e14c0515b983bc
|
7
|
+
data.tar.gz: 10f420fe6acbb77a4285bb17b6598e29a22974b987dc47ea9027bbf5d657d9955439e876d52aa32e47d19342928f482ba4cf9a1ec6bdf2562d4b977d1d19a9cc
|
@@ -25,11 +25,10 @@ class ViewModel::ErrorView < ViewModel::Record
|
|
25
25
|
|
26
26
|
# Ruby exceptions should never be serialized in production
|
27
27
|
def serialize_exception(json, serialize_context:)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
super if model.aggregation?
|
28
|
+
if ViewModel::Config.show_cause_in_error_view
|
29
|
+
super
|
30
|
+
else
|
31
|
+
json.exception nil
|
32
|
+
end
|
34
33
|
end
|
35
34
|
end
|
@@ -210,7 +210,9 @@ class ViewModel::ActiveRecord::ControllerTest < ActiveSupport::TestCase
|
|
210
210
|
'detail' => "Couldn't find Parent(s) with id(s)=[9999]",
|
211
211
|
'title' => nil,
|
212
212
|
'code' => "DeserializationError.NotFound",
|
213
|
-
'meta' => { 'nodes' => [{ '_type' => "Parent", 'id' => 9999 }]}
|
213
|
+
'meta' => { 'nodes' => [{ '_type' => "Parent", 'id' => 9999 }]},
|
214
|
+
'exception' => nil,
|
215
|
+
'causes' => nil }},
|
214
216
|
parentcontroller.hash_response)
|
215
217
|
end
|
216
218
|
|
@@ -232,7 +234,9 @@ class ViewModel::ActiveRecord::ControllerTest < ActiveSupport::TestCase
|
|
232
234
|
'meta' => { 'nodes' => [{ '_type' => "Child", 'id' => nil }],
|
233
235
|
'attribute' => 'age',
|
234
236
|
'message' => 'must be less than 42',
|
235
|
-
'details' => { 'error' => 'less_than', 'value' => 42, 'count' => 42 }}
|
237
|
+
'details' => { 'error' => 'less_than', 'value' => 42, 'count' => 42 }},
|
238
|
+
'exception' => nil,
|
239
|
+
'causes' => nil }},
|
236
240
|
parentcontroller.hash_response)
|
237
241
|
end
|
238
242
|
|
@@ -260,7 +264,9 @@ class ViewModel::ActiveRecord::ControllerTest < ActiveSupport::TestCase
|
|
260
264
|
'detail' => "Couldn't find Parent(s) with id(s)=[9999]",
|
261
265
|
'title' => nil,
|
262
266
|
'code' => "DeserializationError.NotFound",
|
263
|
-
'meta' => { "nodes" => [{"_type" => "Parent", "id" => 9999}]
|
267
|
+
'meta' => { "nodes" => [{"_type" => "Parent", "id" => 9999 }] },
|
268
|
+
'exception' => nil,
|
269
|
+
'causes' => nil } },
|
264
270
|
parentcontroller.hash_response)
|
265
271
|
assert_equal(404, parentcontroller.status)
|
266
272
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iknow_view_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iKnow Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -468,7 +468,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
468
468
|
- !ruby/object:Gem::Version
|
469
469
|
version: '0'
|
470
470
|
requirements: []
|
471
|
-
|
471
|
+
rubyforge_project:
|
472
|
+
rubygems_version: 2.7.6.2
|
472
473
|
signing_key:
|
473
474
|
specification_version: 4
|
474
475
|
summary: ViewModels provide a means of encapsulating a collection of related data
|