rails-param-validation 0.4.0 → 0.4.1
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: 430b5d7c83e83717e20bd96b20961fb51e617e74bb634ee356fdfaf67af9b66f
|
4
|
+
data.tar.gz: e615c6d36cc776b3c2fe8056dd4aa49cc2916a5c591ce06d5b7cccc0c0a56a7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f12c586949c487bb699b6bfe7e0acd52d5a486c15fe6f2dd0e20d17d16ac725249be3fb0ace47553d5df8460bbba763a870193f2f960ed857dba2ceab1d75f
|
7
|
+
data.tar.gz: 01122bc9d7041b99168647219d5b7d8896677b1c3d6cbe394e2e67d3c641f4766a32bea25fcb4f175112ebc89128ba14345f715bba58a7f5181bddf2480722b7
|
@@ -38,7 +38,7 @@ module RailsParamValidation
|
|
38
38
|
|
39
39
|
if result.matches?
|
40
40
|
# Copy the parameters if the validation succeeded
|
41
|
-
@validated_parameters = result.value.merge(action
|
41
|
+
@validated_parameters = result.value.merge('action' => action, 'controller' => controller)
|
42
42
|
else
|
43
43
|
# Render an appropriate error message
|
44
44
|
_render_invalid_param_response result
|
@@ -6,6 +6,11 @@ module RailsParamValidation
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def matches?(path, data)
|
9
|
+
if schema.schema.is_a? NilClass
|
10
|
+
puts path
|
11
|
+
puts schema.inspect
|
12
|
+
end
|
13
|
+
|
9
14
|
ValidatorFactory.create(schema.schema).matches? path, data
|
10
15
|
end
|
11
16
|
|
@@ -24,4 +29,4 @@ module RailsParamValidation
|
|
24
29
|
end
|
25
30
|
end
|
26
31
|
|
27
|
-
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-param-validation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oskar Kirmis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Declarative parameter definition and validation for Rails
|
14
14
|
email:
|