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:
authorRobert Speicher <rspeicher@gmail.com>2016-04-18 21:13:38 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-04-20 00:47:58 +0300
commit8530ce4c6fbc411e00cf426f3b3baca74a4370f7 (patch)
tree572282d216c841d5b47dcee22280c9fb9003fa4e /app/controllers/projects/application_controller.rb
parent90a67a76d5b852c62b59dd52b9dafd58722f2237 (diff)
Clarify that the diff view setting always comes from the cookie
This invalidates one test, which we've removed.
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r--app/controllers/projects/application_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 74150ad606b..be872a93fee 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -83,8 +83,7 @@ class Projects::ApplicationController < ApplicationController
end
def apply_diff_view_cookie!
- view = params[:view] || cookies[:diff_view]
- cookies.permanent[:diff_view] = params[:view] = view if view
+ cookies.permanent[:diff_view] = params.delete(:view) if params[:view].present?
end
def builds_enabled