Commit 7b84758b authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'actioncontroller-parameters-deprecations' into 'master'

Fixes several ActionController::Parameters deprecations

See merge request gitlab-org/gitlab-ce!24332
parents 715f3400 30e2a8f0
......@@ -35,7 +35,7 @@ module Groups
def setup_children(parent)
@children = GroupDescendantsFinder.new(current_user: current_user,
parent_group: parent,
params: params).execute
params: params.to_unsafe_h).execute
@children = @children.page(params[:page])
end
end
......
......@@ -93,7 +93,7 @@ class Projects::BlobController < Projects::ApplicationController
@blob.load_all_data!
@lines = @blob.present.highlight.lines
@form = UnfoldForm.new(params)
@form = UnfoldForm.new(params.to_unsafe_h)
@lines = @lines[@form.since - 1..@form.to - 1].map(&:html_safe)
......
......@@ -4,6 +4,6 @@ class Projects::PipelinesSettingsController < Projects::ApplicationController
before_action :authorize_admin_pipeline!
def show
redirect_to project_settings_ci_cd_path(@project, params: params)
redirect_to project_settings_ci_cd_path(@project, params: params.to_unsafe_h)
end
end
......@@ -3,7 +3,7 @@
module Labels
class CreateService < Labels::BaseService
def initialize(params = {})
@params = params.dup.with_indifferent_access
@params = params.to_h.dup.with_indifferent_access
end
# returns the created label
......
......@@ -3,7 +3,7 @@
module Labels
class UpdateService < Labels::BaseService
def initialize(params = {})
@params = params.dup.with_indifferent_access
@params = params.to_h.dup.with_indifferent_access
end
# returns the updated label
......
......@@ -12,7 +12,7 @@ module Lfs
# rubocop: disable CodeReuse/ActiveRecord
def find_locks
options = params.slice(:id, :path).compact.symbolize_keys
options = params.slice(:id, :path).to_h.compact.symbolize_keys
project.lfs_file_locks.where(options)
end
......
......@@ -55,7 +55,7 @@ module Users
params.reject! { |key, _| read_only.include?(key.to_sym) }
end
@user.assign_attributes(params) if params.any?
@user.assign_attributes(params) unless params.empty?
end
end
end
---
title: Fix several ActionController::Parameters deprecations
merge_request: 24332
author: Jasper Maes
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment