params_cleaner 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/params_cleaner.rb +2 -2
  2. metadata +5 -5
@@ -5,7 +5,7 @@ require "active_support/hash_with_indifferent_access"
5
5
  module ParamsCleaner
6
6
  extend ActiveSupport::Concern
7
7
 
8
- VERSION = "0.2.0"
8
+ VERSION = "0.2.1"
9
9
 
10
10
  def clean_params(root_params = params, top_level = true)
11
11
  cleaned_params = root_params.map do |key, val|
@@ -29,7 +29,7 @@ module ParamsCleaner
29
29
  def _clean_value(key, value, top_level)
30
30
  return [key, value] unless top_level
31
31
 
32
- if self.class._allowed_top_level.include?(key)
32
+ if self.class._allowed_top_level.include?(key.to_sym)
33
33
  [key, value]
34
34
  else
35
35
  []
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.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70105385011580 !ruby/object:Gem::Requirement
16
+ requirement: &70144811460760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70105385011580
24
+ version_requirements: *70144811460760
25
25
  description: Rails mass assignment protection in the controller
26
26
  email:
27
27
  - drew@drewolson.org
@@ -44,7 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
44
44
  version: '0'
45
45
  segments:
46
46
  - 0
47
- hash: 1896846872677650813
47
+ hash: 2864435694347274043
48
48
  required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  segments:
55
55
  - 0
56
- hash: 1896846872677650813
56
+ hash: 2864435694347274043
57
57
  requirements: []
58
58
  rubyforge_project:
59
59
  rubygems_version: 1.8.15