cancan_strong_parameters 0.1.5 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -71,12 +71,12 @@ module CancanStrongParameters
|
|
71
71
|
# Handle attributes if permitted attributes are given for nested models
|
72
72
|
if (hash.present? && keys.present?) || (hash.select{|k,v| v.is_a?(Array)} == hash)
|
73
73
|
|
74
|
-
|
75
|
-
|
74
|
+
defaults = CancanStrongParameters::Controller::HASH_DEFAULTS
|
75
|
+
hash = hash.attributized
|
76
76
|
|
77
77
|
prepend_before_filter :only => actions do
|
78
78
|
resource_name = self.class.resource_name
|
79
|
-
self.params[resource_name] = params[resource_name].standardized.send method, *[*keys.flatten +
|
79
|
+
self.params[resource_name] = params[resource_name].standardized.send method, *[*keys.flatten + defaults, hash]
|
80
80
|
end
|
81
81
|
elsif hash.present?
|
82
82
|
prepend_before_filter :only => actions do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cancan_strong_parameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cancan
|