From 1d375e59f1deeeb13df68baecaf8a0e8602dd933 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sat, 7 Sep 2013 15:16:45 +0300 Subject: do not break params filtering on nil values closes #12149 --- actionpack/lib/action_controller/metal/strong_parameters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/metal/strong_parameters.rb') diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index ae600b1ebe..b495ab3f0f 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -421,7 +421,7 @@ module ActionController # Slicing filters out non-declared keys. slice(*filter.keys).each do |key, value| - return unless value + next unless value if filter[key] == EMPTY_ARRAY # Declaration { comment_ids: [] }. -- cgit v1.2.3