rails-param-validation 0.4.1 → 0.4.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea025e319c6a3d02b8781c6c80ffc068cb72b8d694e3dc1fc843656f2dd4b862
|
4
|
+
data.tar.gz: 9f1f786ec22824cb5ae9eaa8a33ef39d5a147ac9ed19d570e6414513cf418adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ec3191599ac5b8fa5a4dbcf7684759de23a129be732e90275298b358e9d84d53cb653225413cadc229ad03b1e9baecac9dbce2e2269b1d8b9e8344a21b3fff
|
7
|
+
data.tar.gz: 980cf1cde5a0d0500da47c4eb69ec514a28c0da4eb769b13d23d443f63d5587faf915c23705b6178c02817d6665bda3249cc1862bcc1c10093e04b6d1c7514d9
|
@@ -6,6 +6,8 @@ module RailsParamValidation
|
|
6
6
|
|
7
7
|
# The before_action function called which does the actual work
|
8
8
|
def auto_validate_params!
|
9
|
+
@validated_parameters = nil
|
10
|
+
|
9
11
|
# @type [ActionDefinition] definition
|
10
12
|
definition = RailsParamValidation::AnnotationManager.instance.method_annotation self.class.name, action_name.to_sym, :param_definition
|
11
13
|
|
@@ -38,7 +40,7 @@ module RailsParamValidation
|
|
38
40
|
|
39
41
|
if result.matches?
|
40
42
|
# Copy the parameters if the validation succeeded
|
41
|
-
@validated_parameters = result.value.merge(
|
43
|
+
@validated_parameters = result.value.merge(action: action, controller: controller)
|
42
44
|
else
|
43
45
|
# Render an appropriate error message
|
44
46
|
_render_invalid_param_response result
|