cancan_strong_parameters 0.1.2 → 0.1.3
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.
data/README.md
CHANGED
@@ -67,8 +67,8 @@ class ActionController::Base
|
|
67
67
|
if (hash.present? && keys.present?) || (hash.select{|k,v| v.is_a?(Array)} == hash)
|
68
68
|
prepend_before_filter :only => actions do
|
69
69
|
resource_name = self.class.resource_name
|
70
|
-
|
71
|
-
self.params[resource_name] = params[resource_name].send method,
|
70
|
+
hash = self.class.attributized(hash)
|
71
|
+
self.params[resource_name] = params[resource_name].send method, *[*keys.flatten, hash]
|
72
72
|
end
|
73
73
|
elsif hash.present?
|
74
74
|
prepend_before_filter :only => actions do
|
@@ -97,15 +97,6 @@ class ActionController::Base
|
|
97
97
|
end
|
98
98
|
end
|
99
99
|
end
|
100
|
-
|
101
|
-
def self.hashified(whitelist)
|
102
|
-
hash = whitelist.extract_options!
|
103
|
-
array = whitelist.dup
|
104
|
-
whitelist = (hash || {})
|
105
|
-
array.map {|v| whitelist[v] = nil }
|
106
|
-
|
107
|
-
whitelist
|
108
|
-
end
|
109
100
|
end
|
110
101
|
|
111
102
|
module ActionController
|
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.1.
|
4
|
+
version: 0.1.3
|
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-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cancan
|