Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-11-23 09:40:49 +0300
committerSean McGivern <sean@gitlab.com>2018-11-23 09:40:49 +0300
commita1c08c12c8bfdbb241705943cf10453ae12e2fac (patch)
tree99a42bd23768597843258eae2b6ef8e54f6fa89b /app/controllers
parenta033faa2a6b4cb41bcc9eb37cd127e1de2c91c35 (diff)
parent616fbd028c05667f7094e38c81c5db3db379cc1e (diff)
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
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb2
-rw-r--r--app/controllers/sessions_controller.rb2
2 files changed, 2 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,