summaryrefslogtreecommitdiff
path: root/app/controllers/projects/badges_controller.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-04-06 19:55:37 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-04-06 19:56:35 +0200
commit7689e87854980f72f41dcf6924693fb046e1919b (patch)
tree793ed35fb57d855994dc95e0789245027f5b4154 /app/controllers/projects/badges_controller.rb
parent68ac8d38e24d4c63d28f874f1a40e792cfeb4296 (diff)
downloadgitlab-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.rb2
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