new ref switch

This commit is contained in:
gitlabhq 2011-11-03 12:28:33 -04:00
parent 5f900772c2
commit 3ba392b3cb
9 changed files with 1314 additions and 50 deletions

View file

@ -57,19 +57,13 @@ class ApplicationController < ActionController::Base
end
def load_refs
@branch = unless params[:branch].blank?
params[:branch]
else
nil
end
@tag = unless params[:tag].blank?
params[:tag]
else
nil
end
@ref = @branch || @tag || "master"
unless params[:ref].blank?
@ref = params[:ref]
else
@branch = params[:branch].blank? ? nil : params[:branch]
@tag = params[:tag].blank? ? nil : params[:tag]
@ref = @branch || @tag || "master"
end
end
def render_404