default_branch for project & fixed project destroy
This commit is contained in:
parent
2552a877df
commit
d68ec5e0fb
7 changed files with 18 additions and 6 deletions
|
@ -61,7 +61,7 @@ class ApplicationController < ActionController::Base
|
|||
else
|
||||
@branch = params[:branch].blank? ? nil : params[:branch]
|
||||
@tag = params[:tag].blank? ? nil : params[:tag]
|
||||
@ref = @branch || @tag || Repository.default_ref
|
||||
@ref = @branch || @tag || @project.try(:default_branch) || Repository.default_ref
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue