summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-09-14 18:14:17 +0300
committerValery Sizov <vsv2711@gmail.com>2015-09-14 18:14:17 +0300
commit910bf96ec3d60194b2fe4444c1df24f141b8450b (patch)
tree98826617854d4e7f9c2a16e08348e3fcf3a8895f /lib/api/helpers.rb
parenta399fe32e88d9b151426d43325e659df688b2019 (diff)
downloadgitlab-ce-910bf96ec3d60194b2fe4444c1df24f141b8450b.tar.gz
fix specs. Stage 2
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 76c9cc2e3a4..ef0f897a2fb 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -148,15 +148,14 @@ module API
end
end
- def attributes_for_keys(keys)
+ 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]
end
end
-
ActionController::Parameters.new(attrs).permit!
end