Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorJasper Maes <jaspermaes.jm@gmail.com>2018-06-13 23:37:41 +0300
committerJasper Maes <jaspermaes.jm@gmail.com>2018-06-14 00:49:44 +0300
commit876d43b9f5ba54b4f572f4b28ea55cef82cc74ea (patch)
treec24fa75cb2f5a38f8ef521adb6ce905f6811aa02 /lib/api
parent7cf571e95550b3c14eb971ea165a8930b809e1d7 (diff)
Rails5 fix no implicit conversion of Hash into String. ActionController::Parameters no longer returns an hash in Rails 5
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 2ed331d4fd2..9c53b7c3fe7 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -272,7 +272,8 @@ module API
attrs[key] = params_hash[key]
end
end
- ActionController::Parameters.new(attrs).permit!
+ permitted_attrs = ActionController::Parameters.new(attrs).permit!
+ Gitlab.rails5? ? permitted_attrs.to_h : permitted_attrs
end
def filter_by_iid(items, iid)