gitlab-org--gitlab-foss/app/controllers/projects/badges_controller.rb

18 lines
391 B
Ruby
Raw Normal View History

class Projects::BadgesController < Projects::ApplicationController
2016-03-22 05:21:45 -04:00
before_action :no_cache_headers, except: [:index]
def index
end
def build
badge = Gitlab::Badge::Build.new(project, params[:ref])
respond_to do |format|
format.html { render_404 }
format.svg do
send_data(badge.data, type: badge.type, disposition: 'inline')
end
end
end
end