diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-11-27 12:04:00 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-11-27 12:07:02 -0600 |
commit | df8f0ab52128e173690f624575fef286d1a3cf4c (patch) | |
tree | 68e39eb1ed78ccb264a1f6dbaa93b4af7cd52415 /lib/extracts_path.rb | |
parent | 1cd570cf77b79f37f30ef3ccd399c337056aa236 (diff) | |
download | gitlab-ce-df8f0ab52128e173690f624575fef286d1a3cf4c.tar.gz |
Remove `options` assignment from ExtractsPath
This assignment is only used by the Projects::NetworkController, so
we're needlessly assigning this very generically-named instance variable
on every controller which includes `ExtractsPath`, which is quite a few.
Further, the way we were passing this hash to
`HashWithIndifferentAccess` caused the following deprecation warning
after upgrading to Rails 5:
DEPRECATION WARNING: #to_hash unexpectedly ignores parameter
filtering, and will change to enforce it in Rails 5.1. Enable
`raise_on_unfiltered_parameters` to respect parameter filtering,
which is the default in new applications. For the existing
deprecated behaviour, call #to_unsafe_h instead. (called from new at
lib/extracts_path.rb:116)
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r-- | lib/extracts_path.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index 655278da711..b2c8d46ede1 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -110,11 +110,6 @@ module ExtractsPath # resolved (e.g., when a user inserts an invalid path or ref). # rubocop:disable Gitlab/ModuleWithInstanceVariables def assign_ref_vars - # assign allowed options - allowed_options = ["filter_ref"] - @options = params.select {|key, value| allowed_options.include?(key) && !value.blank? } - @options = HashWithIndifferentAccess.new(@options) - @id = get_id @ref, @path = extract_ref(@id) @repo = @project.repository |