Use default branch when displaying list of badges

This commit is contained in:
Grzegorz Bizon 2016-04-06 19:55:37 +02:00
parent 68ac8d38e2
commit 7689e87854
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class Projects::BadgesController < Projects::ApplicationController
before_action :no_cache_headers, except: [:index]
def index
@ref = params[:ref] || 'master'
@ref = params[:ref] || @project.default_branch || 'master'
@build_badge = Gitlab::Badge::Build.new(@project, @ref)
end