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: 430b5d7c83e83717e20bd96b20961fb51e617e74bb634ee356fdfaf67af9b66f
4
- data.tar.gz: e615c6d36cc776b3c2fe8056dd4aa49cc2916a5c591ce06d5b7cccc0c0a56a7d
3
+ metadata.gz: ea025e319c6a3d02b8781c6c80ffc068cb72b8d694e3dc1fc843656f2dd4b862
4
+ data.tar.gz: 9f1f786ec22824cb5ae9eaa8a33ef39d5a147ac9ed19d570e6414513cf418adf
5
5
  SHA512:
6
- metadata.gz: 87f12c586949c487bb699b6bfe7e0acd52d5a486c15fe6f2dd0e20d17d16ac725249be3fb0ace47553d5df8460bbba763a870193f2f960ed857dba2ceab1d75f
7
- data.tar.gz: 01122bc9d7041b99168647219d5b7d8896677b1c3d6cbe394e2e67d3c641f4766a32bea25fcb4f175112ebc89128ba14345f715bba58a7f5181bddf2480722b7
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('action' => action, 'controller' => controller)
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
@@ -1,3 +1,3 @@
1
1
  module RailsParamValidation
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-param-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oskar Kirmis