Commit 7689e878 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Use default branch when displaying list of badges

parent 68ac8d38
...@@ -4,7 +4,7 @@ class Projects::BadgesController < Projects::ApplicationController ...@@ -4,7 +4,7 @@ class Projects::BadgesController < Projects::ApplicationController
before_action :no_cache_headers, except: [:index] before_action :no_cache_headers, except: [:index]
def index def index
@ref = params[:ref] || 'master' @ref = params[:ref] || @project.default_branch || 'master'
@build_badge = Gitlab::Badge::Build.new(@project, @ref) @build_badge = Gitlab::Badge::Build.new(@project, @ref)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment