diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-06 19:55:37 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-06 19:56:35 +0200 |
commit | 7689e87854980f72f41dcf6924693fb046e1919b (patch) | |
tree | 793ed35fb57d855994dc95e0789245027f5b4154 /app/controllers/projects/badges_controller.rb | |
parent | 68ac8d38e24d4c63d28f874f1a40e792cfeb4296 (diff) | |
download | gitlab-ce-7689e87854980f72f41dcf6924693fb046e1919b.tar.gz |
Use default branch when displaying list of badges
Diffstat (limited to 'app/controllers/projects/badges_controller.rb')
-rw-r--r-- | app/controllers/projects/badges_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/badges_controller.rb b/app/controllers/projects/badges_controller.rb index 9dff74c823b..824aa41db51 100644 --- a/app/controllers/projects/badges_controller.rb +++ b/app/controllers/projects/badges_controller.rb @@ -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 |