params_cleaner 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ require "./lib/params_cleaner/whitelist"
8
8
  module ParamsCleaner
9
9
  extend ActiveSupport::Concern
10
10
 
11
- VERSION = "0.4.0"
11
+ VERSION = "0.4.1"
12
12
 
13
13
  def clean_params
14
14
  sanitized_params = _applicable_whitelists.map do |whitelist|
@@ -35,7 +35,11 @@ module ParamsCleaner
35
35
 
36
36
  def _clean_array(key, value)
37
37
  cleaned_values = value.map do |sub_value|
38
- _clean_hash(key, sub_value).last
38
+ if sub_value.is_a?(Hash)
39
+ _clean_hash(key, sub_value).last
40
+ else
41
+ sub_value
42
+ end
39
43
  end
40
44
  [key, cleaned_values]
41
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: params_cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-04 00:00:00.000000000 Z
12
+ date: 2012-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70327972553720 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70327972553720
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.0
25
30
  description: Rails mass assignment protection in the controller
26
31
  email:
27
32
  - drew@drewolson.org
@@ -45,7 +50,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
50
  version: '0'
46
51
  segments:
47
52
  - 0
48
- hash: -3481307884209043138
53
+ hash: -4022608709745824800
49
54
  required_rubygems_version: !ruby/object:Gem::Requirement
50
55
  none: false
51
56
  requirements:
@@ -54,10 +59,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
59
  version: '0'
55
60
  segments:
56
61
  - 0
57
- hash: -3481307884209043138
62
+ hash: -4022608709745824800
58
63
  requirements: []
59
64
  rubyforge_project:
60
- rubygems_version: 1.8.15
65
+ rubygems_version: 1.8.24
61
66
  signing_key:
62
67
  specification_version: 3
63
68
  summary: Rails mass assignment protection in the controller