diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-08 15:35:30 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-08 15:35:30 +1100 |
commit | eddf3febd7e78a442a0b2fbd36d7b92ba769f4a5 (patch) | |
tree | 17ce078c15b18cf28a2c0e65afae1411935168cf /app/helpers/diff_helper.rb | |
parent | dd552d06f6e39d5e6138a33bd7c1bffb2d3dbb1d (diff) | |
download | gitlab-ce-eddf3febd7e78a442a0b2fbd36d7b92ba769f4a5.tar.gz |
[Rails5] Add `safe_params` helper
Rails 5.0 requires to explicitly permit attributes when building a URL
using current `params` object.
The `safe_params` helper allows developers to just call `safe_params.merge(...)`
instead of manually adding `permit` to every call.
https://github.com/rails/rails/pull/20868
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r-- | app/helpers/diff_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index b5ca39711bc..1bb82fd8150 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -180,7 +180,7 @@ module DiffHelper private def diff_btn(title, name, selected) - params_copy = params.dup + params_copy = safe_params.dup params_copy[:view] = name # Always use HTML to handle case where JSON diff rendered this button |