Skip to content
This repository has been archived by the owner on Aug 17, 2017. It is now read-only.

Commit

Permalink
Makes ActionController::Parameters#permit! recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Loudermilk committed Oct 4, 2012
1 parent 729c9da commit 519fc56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/action_controller/parameters.rb
Expand Up @@ -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
Expand Down

0 comments on commit 519fc56

Please sign in to comment.