diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-05 18:25:45 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-05 18:25:45 -0300 |
commit | 62aff55706e4a245080440343730a315be423628 (patch) | |
tree | d9b67c9408cc5b82f5d23f5dfcc354aa47d078ff /actionpack/lib | |
parent | 2b83b07307c3e5552205f33e956d3785ed3e538b (diff) | |
download | rails-62aff55706e4a245080440343730a315be423628.tar.gz rails-62aff55706e4a245080440343730a315be423628.tar.bz2 rails-62aff55706e4a245080440343730a315be423628.zip |
Allow parameter filters to match multi-parameter attributes
This will make easier to permit date/time attributes generated by
helpers like date_select.
[Sven Schwyn + Rafael Mendonça França]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 36fce81d1c..8c3b02d357 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -178,6 +178,7 @@ module ActionController case filter when Symbol, String then params[filter] = self[filter] if has_key?(filter) + keys.grep(/\A#{Regexp.escape(filter)}\(\di\)\z/).each { |key| params[key] = self[key] } when Hash then self.slice(*filter.keys).each do |key, values| return unless values |