summaryrefslogtreecommitdiff
path: root/app/controllers/projects
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-04-18 14:13:38 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-04-19 17:47:58 -0400
commit8530ce4c6fbc411e00cf426f3b3baca74a4370f7 (patch)
tree572282d216c841d5b47dcee22280c9fb9003fa4e /app/controllers/projects
parent90a67a76d5b852c62b59dd52b9dafd58722f2237 (diff)
downloadgitlab-ce-8530ce4c6fbc411e00cf426f3b3baca74a4370f7.tar.gz
Clarify that the diff view setting always comes from the cookiers-diff_view
This invalidates one test, which we've removed.
Diffstat (limited to 'app/controllers/projects')
-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