summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/application_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 17bcef4bb23..8dd407ac16b 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -97,12 +97,12 @@ class ApplicationController < ActionController::Base
end
def load_refs
- unless params[:ref].blank?
- @ref = params[:ref]
- else
+ if params[:ref].blank?
@branch = params[:branch].blank? ? nil : params[:branch]
@tag = params[:tag].blank? ? nil : params[:tag]
@ref = @branch || @tag || @project.try(:default_branch) || Repository.default_ref
+ else
+ @ref = params[:ref]
end
end