app/controllers/projects_controller.rb
def badge
    image_name = if params[:sha]
                   @project.sha_status_image(params[:sha])
                 elsif params[:ref]
                   @project.status_image(params[:ref])
                 else
                   'unknown.png'
                 end

    send_file Rails.root.join('public', image_name), filename: image_name, disposition: 'inline'
  end
# Project status badge
# Image with build status for sha or ref
Project status badge
Image with build status for sha or ref
Project status badge Image with build status for sha or ref
def badge
    image_name = if params[:sha]
                   @project.sha_status_image(params[:sha])
                 elsif params[:ref]
                   @project.status_image(params[:ref])
                 else
                   'unknown.png'
                 end
    send_file Rails.root.join('public', image_name), filename: image_name, disposition: 'inline'
  end
def badge image_name = if params [ :sha ] @project . sha_status_image ( params [ :sha ] ) elsif params [ :ref ] @project . status_image ( params [ :ref ] ) else 'unknown.png' end send_file Rails . root . join ( 'public' , image_name ) , filename : image_name , disposition : 'inline' end
Project status badge
Image with build status for sha or ref
Project status badge Image with build status for sha or ref