Rails5 fix no implicit conversion of Hash into String. ActionController::Parameters no longer returns an hash in Rails 5
This commit is contained in:
parent
7cf571e955
commit
876d43b9f5
2 changed files with 8 additions and 1 deletions
6
changelogs/unreleased/rails5-fix-47835.yml
Normal file
6
changelogs/unreleased/rails5-fix-47835.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Rails5 fix no implicit conversion of Hash into String. ActionController::Parameters
|
||||
no longer returns an hash in Rails 5
|
||||
merge_request: 19792
|
||||
author: Jasper Maes
|
||||
type: fixed
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue