rails-param-validation 0.4.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f36c1fb9e60cc1162e7a1baae9953e77441018a1a12825d72b97731a645d760
4
- data.tar.gz: d4100447e253b96a02cb407dcde58c941ac44f6fb3046f1a54dd17172bcdad6e
3
+ metadata.gz: 430b5d7c83e83717e20bd96b20961fb51e617e74bb634ee356fdfaf67af9b66f
4
+ data.tar.gz: e615c6d36cc776b3c2fe8056dd4aa49cc2916a5c591ce06d5b7cccc0c0a56a7d
5
5
  SHA512:
6
- metadata.gz: 88ff549087489e388b4341a3646930ce38a07f6275fe1649f59181e2940f2ce4086a644300f7574760c654eac71c2d202ffb7ccd7d3b0ac1392ff88fa3e76ee0
7
- data.tar.gz: ab7013451be92067596264d5e7f2689be20269276b0850936bc589ac43fe27276e0279344fa74786016f90fdcb77c8cf257f157793a4f8516a16f31dbd0e1dd7
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: action, controller: controller)
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
@@ -11,4 +11,4 @@ module RailsParamValidation
11
11
  end
12
12
  end
13
13
 
14
- end
14
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RailsParamValidation
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  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.0
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-07-31 00:00:00.000000000 Z
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: