Fix several ActionController::Parameters deprecations
This commit is contained in:
parent
fe4f8cad21
commit
30e2a8f08c
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix several ActionController::Parameters deprecations
|
||||
merge_request: 24332
|
||||
author: Jasper Maes
|
||||
type: other
|
Loading…
Reference in New Issue