diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-01-28 14:49:34 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-01-28 14:49:34 +0100 |
commit | 590e237d552a913d72161f0e40743418251f11a8 (patch) | |
tree | 0743722eae0099ac06ac39573e777b5d9a335e5f /lib/api | |
parent | b636f83e5910d10a954464370efe42cc14a097ba (diff) | |
parent | 9bf47f06ab69a1592cec87825aaaf5bb4adec464 (diff) | |
download | gitlab-ce-590e237d552a913d72161f0e40743418251f11a8.tar.gz |
Merge branch 'master' into highlight-blame
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 3f528b9f7c0..9dacf7c1e86 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -153,10 +153,11 @@ module API end def attributes_for_keys(keys, custom_params = nil) + params_hash = custom_params || params attrs = {} keys.each do |key| - if params[key].present? or (params.has_key?(key) and params[key] == false) - attrs[key] = params[key] + if params_hash[key].present? or (params_hash.has_key?(key) and params_hash[key] == false) + attrs[key] = params_hash[key] end end ActionController::Parameters.new(attrs).permit! |