builds_controller.rb 379 Bytes
Newer Older
Lin Jen-Shin's avatar
Lin Jen-Shin committed
1
class Projects::BuildsController < Projects::ApplicationController
2 3
  before_action :authorize_read_build!

Lin Jen-Shin's avatar
Lin Jen-Shin committed
4
  def index
5
    redirect_to project_jobs_path(project)
Lin Jen-Shin's avatar
Lin Jen-Shin committed
6 7 8
  end

  def show
9
    redirect_to project_job_path(project, job)
Lin Jen-Shin's avatar
Lin Jen-Shin committed
10 11 12
  end

  def raw
13
    redirect_to raw_project_job_path(project, job)
Lin Jen-Shin's avatar
Lin Jen-Shin committed
14 15 16 17 18 19 20 21
  end

  private

  def job
    @job ||= project.builds.find(params[:id])
  end
end