Permalink
Browse files

Makes ActionController::Parameters#permit! recursive

  • Loading branch information...
1 parent 729c9da commit 519fc5672939f16613499a0ffe0e9064f98a9506 @bloudermilk bloudermilk committed Oct 4, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/action_controller/parameters.rb
@@ -22,6 +22,11 @@ def initialize(attributes = nil)
end
def permit!
+ each_pair do |key, value|
+ convert_hashes_to_parameters(key, value)
+ self[key].permit! if self[key].respond_to? :permit!
+ end
+
@permitted = true
self
end

0 comments on commit 519fc56

Please sign in to comment.