diff options
author | Sean McGivern <sean@gitlab.com> | 2018-11-23 06:40:49 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-11-23 06:40:49 +0000 |
commit | a1c08c12c8bfdbb241705943cf10453ae12e2fac (patch) | |
tree | 99a42bd23768597843258eae2b6ef8e54f6fa89b | |
parent | a033faa2a6b4cb41bcc9eb37cd127e1de2c91c35 (diff) | |
parent | 616fbd028c05667f7094e38c81c5db3db379cc1e (diff) | |
download | gitlab-ce-a1c08c12c8bfdbb241705943cf10453ae12e2fac.tar.gz |
Merge branch 'rails5-env-deprecated' into 'master'
Rails5: env is deprecated and will be removed from Rails 5.1
Closes #54384
See merge request gitlab-org/gitlab-ce!22626
-rw-r--r-- | app/controllers/application_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/sessions_controller.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/rails5-env-deprecated.yml | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b839da7770d..9b40ffb26a2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -163,7 +163,7 @@ class ApplicationController < ActionController::Base def log_exception(exception) Raven.capture_exception(exception) if sentry_enabled? - backtrace_cleaner = Gitlab.rails5? ? env["action_dispatch.backtrace_cleaner"] : env + backtrace_cleaner = Gitlab.rails5? ? request.env["action_dispatch.backtrace_cleaner"] : env application_trace = ActionDispatch::ExceptionWrapper.new(backtrace_cleaner, exception).application_trace application_trace.map! { |t| " #{t}\n" } logger.error "\n#{exception.class.name} (#{exception.message}):\n#{application_trace.join}" diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 643eb75c83c..4bd7d71e264 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -104,7 +104,7 @@ class SessionsController < Devise::SessionsController end def failed_login? - (options = env["warden.options"]) && options[:action] == "unauthenticated" + (options = request.env["warden.options"]) && options[:action] == "unauthenticated" end # Handle an "initial setup" state, where there's only one user, it's an admin, diff --git a/changelogs/unreleased/rails5-env-deprecated.yml b/changelogs/unreleased/rails5-env-deprecated.yml new file mode 100644 index 00000000000..2f8573e2ff6 --- /dev/null +++ b/changelogs/unreleased/rails5-env-deprecated.yml @@ -0,0 +1,5 @@ +--- +title: 'Rails5: env is deprecated and will be removed from Rails 5.1' +merge_request: 22626 +author: Jasper Maes +type: other |